Like mutex but allows timed_lock in addition to lock and try_lock.
Synopsis
Declared in <folly/fibers/TimedMutex.h>
class TimedMutex;
Types
Name |
Description |
Behavior options for a TimedMutex. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy the mutex, asserting that no waiters remain. |
Assignment operators |
|
Lock the mutex asynchronously. The coroutine is suspended until the mutex is free. Unlike lock(), this does not block the OS thread when called from a coroutine context. |
|
Lock the mutex asynchronously, returning an RAII guard that releases the lock when it goes out of scope. |
|
Lock the mutex. The thread / fiber is blocked until the mutex is free. |
|
Try to obtain lock without blocking the thread or fiber. |
|
Lock the mutex. The thread / fiber will be blocked until a timeout elapses. |
|
Lock the mutex. The thread / fiber will be blocked until a deadline. |
|
Unlock the mutex and wake up a waiter if there is one. |
Created with MrDocs