Use wake_with scheme in order not to wake w/ the lock held
This way it's possible to wake a thread while holding the lock that protects the thread pointer of going away. The lock itself won't be held by the waker and thus the wakee will be able to use it immedietly w/o ctx. Suggested by Nadav.
Please register or sign in to comment