libeblearntools
ebl::mutex Class Reference

A mutex abstraction class. More...

#include <thread.h>

List of all members.

Public Member Functions

 mutex ()
bool trylock ()
void lock ()
 Lock the mutex (wait if necessary until mutex is available).
void unlock ()
 Unlock the mutex.

Detailed Description

A mutex abstraction class.


Constructor & Destructor Documentation

ebl::mutex::mutex ( )

Use non-recursive mutex so that lock can be called multiple times by the same thread but require only 1 unlock. Also this has to be the 'fast' kind of mutex that blocks the thread until locking/unlocking is successful.


Member Function Documentation

bool ebl::mutex::trylock ( )

Try to lock the mutex but do not wait until mutex is available. This returns true if mutex was available and successfully locked, false otherwise.


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