#line 397 "/home/travis/build/felix-lang/felix/src/packages/pthreads.fdoc"
  
  Condition Variable for pthread synchronisation.
  open class Condition_Variable
  {
    requires package "flx_pthread";
  
    The type of a condition variable.
    type condition_variable = "::flx::pthread::flx_condv_t*" requires condv_hxx;
  
    Condition variable constructor taking unit argument.
    ctor condition_variable: 1 = "new ::flx::pthread::flx_condv_t";
  
    Function to release a condition variable.
    proc destroy: condition_variable = "delete $1;";
  
    Function to wait until a signal is raised on
    the condition variable by another thread.
    proc wait: condition_variable * mutex = "$1->wait($2);";
  
    Function to raise a signal on a condition
    variable which will allow at most one thread
    waiting on it to proceed.
    proc signal: condition_variable = "$1->signal();";
  
    Function to broadcast a signal releasing all
    threads waiting on a conditiona variable.
    proc broadcast: condition_variable = "$1->broadcast();";
  
    Timed wait for signal on condition variable.
    Time in seconds. Resolution nanoseconds.
    gen timedwait: condition_variable * mutex * double -> int = "$1->timedwait($2, $3)";
  }