#include <vtkConditionVariable.h>
vtkConditionVariable allows the locking of variables which are accessed through different threads. This header file also defines vtkSimpleConditionVariable which is not a subclass of vtkObject.
The win32 implementation is based on notes provided by Douglas C. Schmidt and Irfan Pyarali, Department of Computer Science, Washington University, St. Louis, Missouri. http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
Definition at line 143 of file vtkConditionVariable.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Signal () |
void | Broadcast () |
int | Wait (vtkMutexLock *mutex) |
Static Public Member Functions | |
static vtkConditionVariable * | New () |
static int | IsTypeOf (const char *type) |
static vtkConditionVariable * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkConditionVariable () | |
Protected Attributes | |
vtkSimpleConditionVariable | SimpleConditionVariable |
vtkConditionVariable::vtkConditionVariable | ( | ) | [inline, protected] |
Definition at line 167 of file vtkConditionVariable.h.
static vtkConditionVariable* vtkConditionVariable::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
virtual const char* vtkConditionVariable::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkObject.
static int vtkConditionVariable::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
virtual int vtkConditionVariable::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
static vtkConditionVariable* vtkConditionVariable::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkObject.
void vtkConditionVariable::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
void vtkConditionVariable::Signal | ( | ) | [inline] |
Wake one thread waiting for the condition to change.
Definition at line 179 of file vtkConditionVariable.h.
void vtkConditionVariable::Broadcast | ( | ) | [inline] |
Wake all threads waiting for the condition to change.
Definition at line 184 of file vtkConditionVariable.h.
int vtkConditionVariable::Wait | ( | vtkMutexLock * | mutex | ) | [inline] |
Wait for the condition to change. Upon entry, the mutex must be locked and the lock held by the calling thread. Upon exit, the mutex will be locked and held by the calling thread. Between entry and exit, the mutex will be unlocked and may be held by other threads.
mutex | The mutex that should be locked on entry and will be locked on exit (but not in between) |
Normally,this | function returns 0. Should a thread be interrupted by a signal, a non-zero value may be returned. |
Definition at line 189 of file vtkConditionVariable.h.
Definition at line 170 of file vtkConditionVariable.h.