DescriptionReimplement Windows Monitors.
Now using an event object per thread which is linked into a list
of waiters for the monitor.
Notify takes the first element of the list and notifies (FIFO order).
Notify all extracts the entire list and notifies each of them. This
avoids the issues with fairness and correctness of the previous version.
The MonitorWaitData object holding the event and a pointer to the
next waiter is stored in thread local storage and lazily initialized.
R=sgjesse@google.com,asiva@google.com
BUG=1614
TEST=
Committed: https://code.google.com/p/dart/source/detail?r=4537
Patch Set 1 #Patch Set 2 : Fix incorrect list update. #Patch Set 3 : Fix timeout handling. #
Total comments: 10
Patch Set 4 : Avoid copying by holding internal lock during SetEvent #
Messages
Total messages: 6 (0 generated)
|