summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/object_watcher.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/base/object_watcher.cc b/base/object_watcher.cc
index 9872a4c..e641232 100644
--- a/base/object_watcher.cc
+++ b/base/object_watcher.cc
@@ -141,6 +141,10 @@ void CALLBACK ObjectWatcher::DoneWaiting(void* param, BOOLEAN timed_out) {
// Record that we ran this function.
watch->did_signal = true;
+ // Make this run very soon on the target thread. TODO(darin): This could
+ // lead to starving other tasks on the origin thread.
+ watch->set_priority(1000);
+
// We rely on the locking in PostTask() to ensure that a memory barrier is
// provided, which in turn ensures our change to did_signal can be observed
// on the target thread.