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

Unified Diff: mojo/public/cpp/bindings/lib/sync_handle_watcher.cc

Issue 2754143005: Use WaitableEvents to wake up sync IPC waiting (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/lib/sync_handle_registry.cc ('k') | mojo/public/cpp/bindings/sync_event_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/sync_handle_watcher.cc
diff --git a/mojo/public/cpp/bindings/lib/sync_handle_watcher.cc b/mojo/public/cpp/bindings/lib/sync_handle_watcher.cc
index 92b91f445272f41fd6229cc391dd544bd017217c..f20af56b20a2129f40b22675d822628c50eda409 100644
--- a/mojo/public/cpp/bindings/lib/sync_handle_watcher.cc
+++ b/mojo/public/cpp/bindings/lib/sync_handle_watcher.cc
@@ -41,11 +41,11 @@ bool SyncHandleWatcher::SyncWatch(const bool* should_stop) {
return false;
}
- // This object may be destroyed during the WatchAllHandles() call. So we have
- // to preserve the boolean that WatchAllHandles uses.
+ // This object may be destroyed during the Wait() call. So we have to preserve
+ // the boolean that Wait uses.
auto destroyed = destroyed_;
const bool* should_stop_array[] = {should_stop, &destroyed->data};
- bool result = registry_->WatchAllHandles(should_stop_array, 2);
+ bool result = registry_->Wait(should_stop_array, 2);
// This object has been destroyed.
if (destroyed->data)
« no previous file with comments | « mojo/public/cpp/bindings/lib/sync_handle_registry.cc ('k') | mojo/public/cpp/bindings/sync_event_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698