Small helper to keep a resource (boolean) locked. More...
Public Member Functions | |
resource_locker (bool &locked) | |
~resource_locker () | |
Private Attributes | |
bool & | locked_ |
Small helper to keep a resource (boolean) locked.
Some of the event handling routines can't be called recursively, this due to the fact that they are attached to the pre queue and when the forward an event the pre queue event gets triggered recursively causing infinite recursion.
To prevent that those functions check the lock and exit when the lock is held otherwise grab the lock here.
Definition at line 43 of file distributor.cpp.
|
inline |
Definition at line 46 of file distributor.cpp.
References locked_.
|
inline |
Definition at line 52 of file distributor.cpp.
References locked_.
|
private |
Definition at line 59 of file distributor.cpp.
Referenced by resource_locker(), and ~resource_locker().