
14 Feb
2006
14 Feb
'06
10:43 p.m.
On Tuesday 14 February 2006 22:34, Steven Wooding wrote:
void MyClass::spawn_threads() { for ( int ii = 0; ii < num_threads; ++ii) { threadGroup.create_thread( boost::bind( ChildThreadFunc, _1, ii)); } }
void MyClass::ChildThreadFunc( int &threadNumber) { // Does some work }
C++ question. Use &MyClass::ChildThreadFunction as bind's first argument. You will probably also run into trouble with passing the int by reference (why?). Pass it by value. Marc -- Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org Klarälvdalens Datakonsult AB, Platform-independent software solutions