Boost logo

Boost Users :

Subject: Re: [Boost-users] Race condition with Boost::Thread
From: Ilya Sokolov (ilyasokol_at_[hidden])
Date: 2009-07-30 07:33:59


Rob Yull wrote:
> WorkerThread()
> {
> m_Thread = boost::thread(boost::bind(&WorkerThread::run, boost::ref(this)));

It should not compile, you need

m_Thread = boost::thread(boost::bind(&WorkerThread::run, this));

or simply

m_Thread = boost::thread(&WorkerThread::run, this);

> m_Running = true;
> }


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net