#include <quantum_mutex.h>
◆ ReverseGuard() [1/2]
Mutex::ReverseGuard::ReverseGuard |
( |
Mutex & |
mutex | ) |
|
|
inlineexplicit |
Construct this object and unlock the passed-in mutex.
- Parameters
-
[in] | mutex | Mutex which remains unlocked during the lifetime of this object. |
- Note
- This constructor must be used in a non-coroutine context.
- Warning
- Wrongfully calling this method from a coroutine will block all coroutines running in the same queue when this object is destroyed and thus result in noticeable performance degradation.
◆ ReverseGuard() [2/2]
Construct this object and unlock the passed-in mutex.
- Parameters
-
[in] | sync | Pointer to a coroutine synchronization object. |
[in] | mutex | Mutex which remains unlocked during the lifetime of this object. |
- Note
- This constructor must be used in a coroutine context.
◆ ~ReverseGuard()
Mutex::ReverseGuard::~ReverseGuard |
( |
| ) |
|
|
inline |
Destroys this object and locks the underlying mutex.