userver icon indicating copy to clipboard operation
userver copied to clipboard

Single-waiter mutex

Open itrofimow opened this issue 2 years ago • 0 comments

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.

itrofimow avatar Aug 27 '22 19:08 itrofimow