• fdoray's avatar
    Make WaitableEventWatcher TaskScheduler-friendly. · cc6bd5c9
    fdoray authored
    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
    
    Review-Url: https://codereview.chromium.org/2368423002
    Cr-Commit-Position: refs/heads/master@{#422856}
    cc6bd5c9
waitable_event_watcher_posix.cc 8.53 KB