
10 Jun
2009
10 Jun
'09
8:44 p.m.
AMDG James Auger wrote:
<snip>
class Example { public: Example(); void run() { flag = 1; boost::thread _myThread(boost::bind(&Example::threadLoop, this)); };
You are creating a new boost::thread which is completely unrelated to the member _myThread. Try _myThread = boost::thread(boost::bind(&Example::threadLoop, this));
void terminate();
private: void threadLoop();
boost::thread _myThread; int flag; };
In Christ, Steven Watanabe