DescriptionNew task queueing primitive for async tasks: TaskQueue.
TaskQueue is a new way to asynchronously execute tasks sequentially
in a thread safe manner with minimal locking. The implementation
uses OS supported APIs to do this that are compatible with async IO
notifications from things like sockets and files.
This class is a part of rtc_base_approved, so can be used by both
the webrtc and libjingle parts of the WebRTC library. Moving forward,
we can replace rtc::Thread and webrtc::ProcessThread with this implementation.
NOTE: It should not be assumed that all tasks that execute on a TaskQueue,
run on the same thread. E.g. on Mac and iOS, we use GCD dispatch queues
which means that tasks might execute on different threads depending on
what's the most efficient thing to do.
Committed: https://crrev.com/0c9df5e5689c8d834149ffc673c04e4216a4a774
Cr-Commit-Position: refs/heads/master@{#12561}
Patch Set 1 #Patch Set 2 : Fix variable destruction order in PostALot #
Total comments: 34
Patch Set 3 : Address comments #
Total comments: 14
Patch Set 4 : Update docs and add support for cleanup lambdas #
Total comments: 4
Patch Set 5 : Address comments+handle error reported by tsan #
Messages
Total messages: 27 (7 generated)
|