
"vicente.botet" <vicente.botet@wanadoo.fr> writes:
From: "vicente.botet" <vicente.botet@wanadoo.fr>
packaged_task do not accept boost::ref to nullary functions while thread allows it. Shouldn't packaged_task > accept them? How can the user workaround this issue? How thread solved this issue?
I have found a workaround. Instead of boost::packaged_task<unsigned > tsk(boost::ref(f)); I use boost::packaged_task<unsigned> tsk(boost::bind(boost::ref(f)));
Is this the correct way?
That's essentially what Boost.Thread does. Anthony -- Anthony Williams Author of C++ Concurrency in Action | http://www.manning.com/williams 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