DescriptionMake WaitableEventWatcher TaskScheduler-friendly.
With this CL, WaitableEventWatcher uses SequencedTaskRunnerHandle
instead of MessageLoop::current() to post back to the sequence that
called StartWatching().
Also, WaitableEventWatcher no longer registers itself as a destruction
observer of the MessageLoop from which StartWatching() is called. If
the watched WaitableEvent is signaled after the MessageLoop is
destroyed, the task posted by WaitableEventWatcher to the
SequencedTaskRunner will simply not run (no crash).
MessageLoop::current() and destruction observer do not work with
TaskScheduler.
BUG=650318
Committed: https://crrev.com/cc6bd5c938f5d4dfa33ed1bbe962a2effc12d597
Cr-Commit-Position: refs/heads/master@{#422856}
Patch Set 1 #Patch Set 2 : fix test error #Patch Set 3 : self-review #
Total comments: 8
Patch Set 4 : CR dcheng #16 #Patch Set 5 : add missing include #
Messages
Total messages: 24 (17 generated)
|