Boost logo

Boost Users :

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,

teThreadState eState;

void run() throw()
  scoped_lock lock(mutex);
  eState = RUNNING;

  eState = BLOCKED;

  while( condition )
    cond.wait( lock );

  eState = RUNNING;


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