A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will lead to deadlock, in other words the Spin_Lock is non-reentrant. Thread will not suspend waiting for resource but will "spin". More...
#include <Spin_Lock.h>
Classes | |
| class | Scoped_Lock |
| Spin_Lock object is acquired on Scoped_Lock construction and released on destruction. More... | |
Public Member Functions | |
| void | Get () |
| Gets the Spin_Lock. If it is not free then waits (blocking) and either gets the mutex or waits forever. | |
| bool | TryGet () |
| Tries getting the lock, returns "false" when mutex is already locked and "true" otherwise. | |
| void | Release () |
| Releases the Spin_Lock allowing other threads to access the protected resource. | |
A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will lead to deadlock, in other words the Spin_Lock is non-reentrant. Thread will not suspend waiting for resource but will "spin".