(no title)
gpderetta | 9 days ago
If I understand the problem correctly, the standard library could specialize the scoped lock objects for the shared mutex, online allocate the waiter object in the lock (so it will be in the stack) and use an internal dedicated API.
It might be harder (but not impossible) to interoperate threads using direct lock calls with threads using the scoped API.
In any case it is a moot point, as I don't think any std library does it nor will never do as it would probably be ABI breaking.
nly|7 days ago