Subject: Re: [boost] [threadpool] relation with TR2 proposal
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2008-09-26 16:17:26
"vicente.botet" <vicente.botet_at_[hidden]> writes:
> BTW, Anthony, how packaged_task are related to the class thread_pool
> in n2276. I don't see any connection in the interface.
packaged_task is intended to be a building block for a simple thread
pool. As such it will not be exposed to the user: just the future will
be visible. See the intro to
> Shouldn't submit_task return a packaged_task<T>
> template<typename F>
> packaged_task<typename result_of<F()>::type> submit_task(F const& f);
No. You don't want the task handle, but the future.
> Shouldn't be also the case for the functions launch_in_pool and
-- Anthony Williams | Just Software Solutions Ltd Custom Software Development | http://www.justsoftwaresolutions.co.uk Registered in England, Company Number 5478976. Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL