|
Boost : |
Subject: Re: [boost] [future William proposal] packaged_task do not acceptboost::ref of a nullary functor
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-01-03 20:24:45
----- Original Message -----
From: "vicente.botet" <vicente.botet_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, January 03, 2009 6:53 PM
Subject: [boost] [future William proposal] packaged_task do not acceptboost::ref of a nullary functor
> Hi,
>
> 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?
Regards,
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk