Futex throughput on Linux
问题 I have an async API which wraps some IO library. The library uses C style callbacks, the API is C++, so natural choice (IMHO) was to use std::future/std::promise to build this API. Something like std::future<void> Read(uint64_t addr, byte* buff, uint64_t buffSize) . However, when I was testing the implementation I saw that the bottleneck is the future/promise , more precisely, the futex used to implement promise/future . Since the futex, AFAIK, is user space and the fastest mechanism I know