31 Aug
2010
31 Aug
'10
8:01 p.m.
Hello,
I use boost::thread as follow:
mp_Thread = new boost::thread(boost::bind(CSubsystem::TaskWrapper,
On Tuesday, August 31, 2010 1:31 PM, Jean-Sebastien Stoezel wrote: 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?
Jean-Sebastien
What prevents you from creating the thread as the last step in your initialization method?