Boost logo

Boost Users :

Subject: Re: [Boost-users] Creating a thread and blocking its execution
From: Andrew Holden (aholden_at_[hidden])
Date: 2010-08-31 16:01:41

On Tuesday, August 31, 2010 1:31 PM, Jean-Sebastien Stoezel wrote:
> Hello,
> I use boost::thread as follow:
> mp_Thread = new boost::thread(boost::bind(CSubsystem::TaskWrapper,
> to create a thread in an initialization method. I observe that this
> gets to run before my initialization method has completed its
> I would like to create a thread from this initialization method, and
> for it to execute until the whole initialization process it done.
> Is it possible to create a thread in suspended mode, and then release
> once the system is ready? Or do I need to use a synchronization
> like a semaphore to release it?
> Jean-Sebastien

What prevents you from creating the thread as the last step in your
initialization method?

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