Logo Search packages:      
Sourcecode: ardour version File versions  Download package

Glib::Cond Class Reference

#include <thread.h>

List of all members.

Detailed Description

An opaque data structure to represent a condition. A Cond is an object that threads can block on, if they find a certain condition to be false. If other threads change the state of this condition they can signal the Cond, such that the waiting thread is woken up.
Usage example:
 Glib::Cond data_cond;
 Glib::Mutex data_mutex;
 void* current_data = NULL;
 void push_data (void* data)
   current_data = data;
 void* pop_data ()
   void* data;
   while (!current_data)
   data = current_data;
   current_data = NULL;
   return data;

Definition at line 642 of file thread.h.

Public Member Functions

void broadcast ()
GCond * gobj ()
void signal ()
bool timed_wait (Mutex &mutex, const Glib::TimeVal &abs_time)
void wait (Mutex &mutex)

Private Member Functions

 Cond (const Cond &)
Condoperator= (const Cond &)

Private Attributes

GCond * gobject_

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index