Boost logo

Boost :

From: jsiek_at_[hidden]
Date: 2000-08-10 14:11:58

So one thing that bothers me about pthreads is the complexity of the
usage scenario for condition variables. Have any of you seen ways to
simplify this?

Just as a reminder, here's how the usage goes:

Thread 1:

  while (!some_condition)
    pthread_cond_wait(&cv, &m);
  // now some_condition == true
  // do something useful

Thread 2:

  some_condition = true;

Maybe there's a way to hide that while loop if a Predicate function
object is attached to the condition variable?



Boost list run by bdawes at, gregod at, cpdaniel at, john at