30 Aug
2005
30 Aug
'05
9:52 p.m.
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