libcoro  1.0
Coroutine support library for C++20

◆ unlock()

promise<ownership>::notify coro::mutex::unlock ( )
inlineprotected

unlock the lock

if queue is empty, tries to swap locked() to nullptr, however if this fails, it builds queue and continues with the queue

if queue is not empty, retrieves the first awaiter, removes it from the queue and resumes it, which transfers ownership to the new owner.

Definition at line 186 of file mutex.h.

+ Here is the caller graph for this function: