[cpp-threads] Asynchronous Execution Issues (caching_async)
Anthony Williams
anthony at justsoftwaresolutions.co.uk
Fri May 1 23:21:37 BST 2009
At Fri 01 May 2009 22:34:17 BST, "Boehm, Hans" <hans.boehm at hp.com> wrote:
> Here's a draft of a paper on these issues that Lawrence and I are
> about to submit.
Sorry for my lack of reply earlier. I didn't see the messages until now.
I'm concerned about removing detach(). It makes it very hard (if not
impossible) to write a simple async function without using a thread
pool unless one also has a wait-for-the-thread variant of a future.
Even with a wait-for-the-thread future, what happens if no-one waits?
Do we get a thread leak? Join on destruction? Throw on destruction?
Also, people will expect detach(). Boost has it. POSIX has it. Both
have destructors for thread-locals. This would be seen as a big step
backwards.
Anthony
--
Anthony Williams
Author of C++ Concurrency in Action | http://www.manning.com/williams
just::thread C++0x thread library | http://www.stdthread.co.uk
Custom Software Development | http://www.justsoftwaresolutions.co.uk
Just Software Solutions Ltd, Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK
More information about the cpp-threads
mailing list