userver
userver copied to clipboard
Single-waiter mutex
There are some situations when a resource is accessed concurrently, but concurrency factor is limited by 2, - implications of socket r/w duality come to mind, - and engine::Mutex
seems like a go to choice (and it is), however it operates over full-featured WaitList
, when in this specific case WaitListLight
would do, since there's at most 1 waiter at any given moment.