facebookexperimental / facebookexperimental/libunifex
Mutex::unlock serialize code after it
Open
bug
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
I think it's really bad that mutex serialize all waiters to single thread.
I think unlock should be something like this, if it async:
Executor.Schedule(after unlock code);
ExecuteHere(next critical section)
But we don't have async dtor :(, so for unique lock something like:
Executor.Schedule(next critical section)
ExecuteHere(after unlock code)
But now test like this doesn't work:
https://github.com/YACLib/YACLib/blob/main/test/unit/coro/async_mutex.cpp#L273
Check Unlock in our library:
https://github.com/YACLib/YACLib/blob/main/include/yaclib/coro/async_mutex.hpp
Contributor guide
Assessment
This issue has not been assessed yet.