Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix a race in thread wakeup #459
When unparking a worker thread, we do the following steps:
The problem occurs if the thread transitions from SLEEP to IDLE between steps 1 and 2. In that case, step 3 will fail to transition and simply return from
This PR changes the step 3 so that we always transition to NOTIFY, no matter what the previous state was.
The park/unpark mechanism in
In addition to that, I did a bunch of random improvements to the documentation.