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

Issue 1984503002: Reland of New task queueing primitive for async tasks: TaskQueue. (Closed)

Created:
4 years, 7 months ago by tommi
Modified:
4 years, 5 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Reland of New task queueing primitive for async tasks: TaskQueue. New 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. TBR=perkj@webrtc.org,phoglund@webrtc.org Committed: https://crrev.com/c06b133b2907ea67f2c1f23488a51e0de643e9ef Cr-Commit-Position: refs/heads/master@{#12749}

Patch Set 1 #

Patch Set 2 : Exclude nacl in GN for now due to 'config.h' issues in Chrome #

Patch Set 3 : Turn off libevent if it's not available in the current build config #

Patch Set 4 : Optional initialization for build_for #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+1336 lines, -8 lines) Patch
M webrtc/base/BUILD.gn View 1 3 chunks +24 lines, -0 lines 2 comments Download
M webrtc/base/base.gyp View 1 2 2 chunks +24 lines, -0 lines 1 comment Download
M webrtc/base/base_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A webrtc/base/task_queue.h View 1 chunk +277 lines, -0 lines 0 comments Download
A webrtc/base/task_queue_gcd.cc View 1 chunk +167 lines, -0 lines 0 comments Download
A webrtc/base/task_queue_libevent.cc View 1 chunk +318 lines, -0 lines 0 comments Download
A + webrtc/base/task_queue_posix.h View 1 1 chunk +22 lines, -8 lines 0 comments Download
A webrtc/base/task_queue_posix.cc View 1 chunk +40 lines, -0 lines 0 comments Download
A webrtc/base/task_queue_unittest.cc View 1 chunk +261 lines, -0 lines 0 comments Download
A webrtc/base/task_queue_win.cc View 1 chunk +184 lines, -0 lines 0 comments Download
M webrtc/build/common.gypi View 1 2 3 4 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (12 generated)
tommi
Created Reland of New task queueing primitive for async tasks: TaskQueue.
4 years, 7 months ago (2016-05-14 13:00:22 UTC) #1
tommi
Exclude nacl in GN for now due to 'config.h' issues in Chrome
4 years, 7 months ago (2016-05-14 13:15:58 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1984503002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1984503002/240001
4 years, 7 months ago (2016-05-14 13:16:12 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 14:23:14 UTC) #8
tommi
Turn off libevent if it's not available in the current build config
4 years, 7 months ago (2016-05-14 16:02:44 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1984503002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1984503002/260001
4 years, 7 months ago (2016-05-14 16:03:05 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_arm64_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios_arm64_rel/builds/9716) ios_rel on ...
4 years, 7 months ago (2016-05-14 16:04:16 UTC) #13
tommi
Optional initialization for build_for
4 years, 7 months ago (2016-05-14 16:21:19 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1984503002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1984503002/280001
4 years, 7 months ago (2016-05-14 16:21:35 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 17:35:29 UTC) #18
tommi
per, patrik - there isn't any code change in this reland (or the previous ones), ...
4 years, 7 months ago (2016-05-14 18:29:28 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1984503002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1984503002/280001
4 years, 7 months ago (2016-05-14 18:29:45 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:280001)
4 years, 7 months ago (2016-05-14 18:31:45 UTC) #23
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/c06b133b2907ea67f2c1f23488a51e0de643e9ef Cr-Commit-Position: refs/heads/master@{#12749}
4 years, 7 months ago (2016-05-14 18:31:56 UTC) #25
phoglund
https://codereview.webrtc.org/1984503002/diff/280001/webrtc/base/base.gyp File webrtc/base/base.gyp (right): https://codereview.webrtc.org/1984503002/diff/280001/webrtc/base/base.gyp#newcode128 webrtc/base/base.gyp:128: ['build_libevent!=1', { Hmm, this isn't going to work since ...
4 years, 7 months ago (2016-05-16 09:59:10 UTC) #26
kjellander_webrtc
4 years, 7 months ago (2016-05-16 12:25:51 UTC) #28
Message was sent while issue was closed.
drive-by review.

https://codereview.webrtc.org/1984503002/diff/280001/webrtc/base/BUILD.gn
File webrtc/base/BUILD.gn (right):

https://codereview.webrtc.org/1984503002/diff/280001/webrtc/base/BUILD.gn#new...
webrtc/base/BUILD.gn:183: if (!is_win && !is_mac && !is_ios && !is_nacl) {
For GN, please introduce the same variables as for the GYP build, in
webrtc/build/webrtc.gni.

https://codereview.webrtc.org/1984503002/diff/280001/webrtc/base/BUILD.gn#new...
webrtc/base/BUILD.gn:189: sources -= [ "task_queue_libevent.cc" ]
Please only add to sources, i.e. avoid using subtraction from sources listings
(applies to GYP as well).
I've spend a fair amount of time cleaning up webrtc/base from this (see  
https://codereview.webrtc.org/1857163003 for a painful CL) and I don't want to
see it regress again. Maintenance become very cumbersome and error prone.

Powered by Google App Engine
This is Rietveld 408576698