[cpp-threads] Asynchronous Execution Issues
Boehm, Hans
hans.boehm at hp.com
Mon May 4 18:04:35 BST 2009
> From: Oliver Kowalke
> Hello,
>
> I'm currently implementing a library (boost.task formaly known as
> boost.threadpool) which implements this kind of functionality.
>
> - second item:
> launch_in_thread() (== std::caching_async()) returns a handle
> object which contain a smart pointer of boost::thread
> (==std::thread). If the last instance of this handle gets out
> of scope the custom destructor of smart pointer calls
> thread::join() on the thread object (releasing the thread).
> BTW handle allows to interrupt the task executed by the
> thread and works as a async completion token (contains a
> future and exposes this interface).
>
I'm not sure I fully understand this, but it sounds like it has potential, if you could get limited reuse of threads while still bounding the lifetime of thread_locals.
Hans
More information about the cpp-threads
mailing list