Boost logo

Boost Users :

Subject: Re: [Boost-users] Problem with boost:thread
From: Igor R (boost.lists_at_[hidden])
Date: 2010-03-04 12:02:08


>     void start(){m_Thread = new boost::thread( &Thread::run, this ); };
> //wont start unless I add m_Thread.join();

The thread is created and started anyway. Join() just tells the
*caller* thread to wait until m_Thread finishes.

>     void start(){g_Thread.create_thread(&Thread::run); };

g_Thread.create_thread(boost::bind(&Thread::run, this));


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