
8 Feb
2007
8 Feb
'07
11:18 p.m.
Eugene Lyubimkin wrote:
*Now class _boost::thread_ have only one constructor: /thread::thread( const function0<void>& )
/So we cannot send any parameter to thread's main function, because its prototype have no parameters. My proposal: let add constructor /thread::thread( const function1<void, void*>& )/ Parameter with type /void* /will be sent to thread function.
struct Foo { void operator() { /* some code */ } /* some members */ }; Foo foo; boost::thread(foo); the members of the functor advantageously replace void*.