$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Christian Henning (chhenning_at_[hidden])
Date: 2005-08-30 16:52:36
I don't think you can do that with the thread lib. If you need to wait
until a thread is finished you can use the join().
You can of course keep the state somewhere else. Like:
enum teThreadState
{
BLOCKED = 0,
RUNNING,
...
}
teThreadState eState;
void run() throw()
{
scoped_lock lock(mutex);
eState = RUNNING;
doSomething();
eState = BLOCKED;
while( condition )
cond.wait( lock );
eState = RUNNING;
}
Christian