BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
ThreadRecursionProtector allows to prevent a recursive or repetitive execution of a code. The protection is implemented via methods enter() and leave(). To simplify using of the ThreadRecursionProtector, the ThreadRecursionProtector::Guard is to be used. More...
#include <ThreadRecursionProtector.h>
Data Structures | |
class | Guard |
Guard calls ThreadRecursionProtector::enter() from constructor and ThreadRecursionProtector::leave() from its destructor. More... | |
Public Member Functions | |
void | enter (const char *file=0, int line=0) |
Mark location where the recursion is possible. If the enter is called again, it would fail. | |
void | leave () |
Leave location where the recursion was possible. Now, the ThreadRecursionProtector::enter() would not fail. | |
ThreadRecursionProtector allows to prevent a recursive or repetitive execution of a code. The protection is implemented via methods enter() and leave(). To simplify using of the ThreadRecursionProtector, the ThreadRecursionProtector::Guard is to be used.