libcoro  1.0
Coroutine support library for C++20

◆ do_lock()

promise<ownership>::notify coro::mutex::do_lock ( future< ownership > *  fut_awt)
inlineprotected

initiate lock operation

registers the awaiter as a new request. If it is first request, the lock has been acquired, builds queue of requests and returns false. Otherwise keeps awaiter registered and returns true

Parameters
awtawaiter
Return values
falsecan't registrer, we acquired ownership, so continue
trueregistered, we can wait

Definition at line 146 of file mutex.h.

+ Here is the caller graph for this function: