Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Issue 9361036: Implement condition variables on Windows on top of Event/SetEvent/ResetEvent. (Closed)

Created:
8 years, 10 months ago by Mads Ager (google)
Modified:
8 years, 10 months ago
Reviewers:
Søren Gjesse, siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement condition variables on Windows on top of Event/SetEvent/ResetEvent. ConditionVariable is only available since Vista so to support XP we need to implement this ourselves. R=asiva@google.com,sgjesse@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=4126

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -23 lines) Patch
M runtime/platform/thread_win.h View 1 chunk +17 lines, -5 lines 0 comments Download
M runtime/platform/thread_win.cc View 2 chunks +75 lines, -18 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
Mads Ager (google)
8 years, 10 months ago (2012-02-08 15:06:05 UTC) #1
Søren Gjesse
lgtm https://chromiumcodereview.appspot.com/9361036/diff/1/runtime/platform/thread_win.cc File runtime/platform/thread_win.cc (right): https://chromiumcodereview.appspot.com/9361036/diff/1/runtime/platform/thread_win.cc#newcode217 runtime/platform/thread_win.cc:217: EnterCriticalSection(&data_.waiters_cs_); I am wondering whether we can get ...
8 years, 10 months ago (2012-02-08 15:32:58 UTC) #2
siva
Chrome seems to use a different approach for solving this. Please see http://www.cs.wustl.edu/~schmidt/win32-cv-1.html which describes ...
8 years, 10 months ago (2012-02-08 22:19:27 UTC) #3
cshapiro
An added benefit of using a per-thread semaphore is that the monitor waiting code can ...
8 years, 10 months ago (2012-02-08 22:52:02 UTC) #4
Mads Ager (google)
Thanks for the comments. I will be happy to move to the list of events ...
8 years, 10 months ago (2012-02-09 07:45:00 UTC) #5
cshapiro
8 years, 10 months ago (2012-02-09 09:18:20 UTC) #6
Another comment... you will likely want to avoid creating an explicit list of
events like the chrome condition variable.  That is required when the native
thread object cannot carry around its own synchronization primitive to wait on. 
Rather, you want to link together each thread object into separate queues for
waiting and entering a monitor.

Powered by Google App Engine
This is Rietveld 408576698