Comment by gpderetta
11 hours ago
CPS can trivially deadlock for all meaningful definitions of deadlock.
Would you consider this a mutex?
async_mutex mux;
co_await mux.lock();
/* critical section */
co_await mux.unlock();
What about: my_mutex mux;
{
std::lock_guard _{mux};
/* critical section */
}
where the code runs in a user space fiber.
Would you consider boost synchronized a mutex?
Don't confuse the semantics with the implementation details (yes async/await leaks implementation details).
No comments yet
Contribute on Hacker News ↗