
24 Oct
2008
24 Oct
'08
9:47 a.m.
<jon_zhou@agilent.com> writes:
how to pass parameter to threadfunc seems it use function0<>
You must be using an old version of boost.thread. Boost.Thread hasn't relied on boost.function since v1.35. Since boost 1.36 you have been able to pass arguments to the thread constructor: boost::thread t(func,arg1,arg2); You can always use boost.bind: boost::thread t(boost::bind(func,arg1,arg2)); This should work with older versions of boost.thread too. Anthony -- 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