![]() |
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
![]() |
#include <FXSynchronise.h>
Public Methods | |
FXSynchronise (FXLockable &l) | |
FXSynchronise (FXRunnable &r) | |
~FXSynchronise () |
This has the advantage that mutex.unlock() will be called automatically when an exception is thrown, ie. the 'synchronise' goes out of scope. ie. auto lock/unlock of mutex
As an alternative to: { mutex.lock(); ..... mutex.unlock(); }
you can use a single instance of the FXSynchronise class: { FXSynchronise(mutex); .... }
for cases in FXRunnable derived classes, you could use the FXSYNCHRONISE macro in FXThread derived clases: { FXSYNCHRONISE ... }
Definition at line 60 of file FXSynchronise.h.
|
on construction, lock the lockable.
Definition at line 63 of file FXSynchronise.h. |
|
lock the mutex using the FXSYNCHRONISE macro.
Definition at line 66 of file FXSynchronise.h. |
|
unlock the lockable on destruction.
Definition at line 69 of file FXSynchronise.h. |