e92d0eab5a
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= Review URL: https://chromiumcodereview.appspot.com//9424050 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4537 260f80e4-7a28-3924-810f-c04153c831b5