equal
deleted
inserted
replaced
5234 // that it will take two back-to-back park() calls for the owning |
5234 // that it will take two back-to-back park() calls for the owning |
5235 // thread to block. This has the benefit of forcing a spurious return |
5235 // thread to block. This has the benefit of forcing a spurious return |
5236 // from the first park() call after an unpark() call which will help |
5236 // from the first park() call after an unpark() call which will help |
5237 // shake out uses of park() and unpark() without condition variables. |
5237 // shake out uses of park() and unpark() without condition variables. |
5238 |
5238 |
5239 if (Atomic::xchg(1, &_Event) >= 0) return; |
5239 if (Atomic::xchg(&_Event, 1) >= 0) return; |
5240 |
5240 |
5241 ::SetEvent(_ParkHandle); |
5241 ::SetEvent(_ParkHandle); |
5242 } |
5242 } |
5243 |
5243 |
5244 |
5244 |