Boost logo

Boost Users :

Subject: [Boost-users] Creating a thread and blocking its execution
From: Jean-Sebastien Stoezel (js.stoezel_at_[hidden])
Date: 2010-08-31 13:31:22


I use boost::thread as follow:

mp_Thread = new boost::thread(boost::bind(CSubsystem::TaskWrapper, this));

to create a thread in an initialization method. I observe that this thread
gets to run before my initialization method has completed its execution.

I would like to create a thread from this initialization method, and wait
for it to execute until the whole initialization process it done.
Is it possible to create a thread in suspended mode, and then release it
once the system is ready? Or do I need to use a synchronization mechanism
like a semaphore to release it?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at