TuttleOFX  1
OFX::MultiThread::Mutex Class Reference

An OFX mutex. More...

#include <ofxsMultiThread.h>

Collaboration diagram for OFX::MultiThread::Mutex:

Public Member Functions

 Mutex (int lockCount=0)
 ctor
virtual ~Mutex (void)
 dtor
void lock ()
 lock it, blocks until lock is gained
void unlock ()
 unlock it
bool tryLock ()
 attempt to lock, non-blocking

Protected Attributes

OfxMutexHandle _handle
 The handle.

Detailed Description

An OFX mutex.

Definition at line 86 of file ofxsMultiThread.h.


Constructor & Destructor Documentation

OFX::MultiThread::Mutex::Mutex ( int  lockCount = 0)

ctor

Definition at line 129 of file ofxsMultiThread.cpp.

References _handle, OFX::Private::gThreadSuite, OfxMultiThreadSuiteV1::mutexCreate, and OFX::throwSuiteStatusException().

Here is the call graph for this function:

OFX::MultiThread::Mutex::~Mutex ( void  ) [virtual]

Member Function Documentation

void OFX::MultiThread::Mutex::lock ( void  )
bool OFX::MultiThread::Mutex::tryLock ( )

attempt to lock, non-blocking

returns

  • true if the lock was achieved
  • false if it could not

Definition at line 160 of file ofxsMultiThread.cpp.

References _handle, OFX::Private::gThreadSuite, kOfxStatOK, and OfxMultiThreadSuiteV1::mutexTryLock.

void OFX::MultiThread::Mutex::unlock ( void  )

Field Documentation

The handle.

Definition at line 89 of file ofxsMultiThread.h.

Referenced by lock(), Mutex(), tryLock(), unlock(), and ~Mutex().


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