
On Wed, Jun 10, 2009 at 4:44 PM, Steven Watanabe
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));
Thanks! That was the problem. Though I had to bang my head against the wall of boost syntax to figure out that it was looking for: _myThread = boost::move(boost::thread(boost::bind(&Example::threadLoop, this))); As much as I like boost, sometimes I feel like programing with it is like playing one of those text-based adventure games where the challenge isn't solving the puzzles, it's guessing the syntax...
void terminate();
private: void threadLoop();
boost::thread _myThread; int flag; };
In Christ, Steven Watanabe
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thanks, James