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

Issue 1981893002: Adds macros to annotate variables and functions used from same thread or queue. (Closed)

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

Description

Adds macros to annotate variables and functions used from same thread or queue. ACCESS_ON is an alias of GUARDED_BY but should take thread-like object instead of mutex, RUN_ON is an alias of EXCLUSIVE_LOCKS_REQUIRED to annotate function always run on same thread/task_queue RTC_DCHECK_RUN_ON - creates an object that allows use of annotated variables and functions, and adds a run-time DCHECK given thread/queue is current. R=tommi@webrtc.org Committed: https://crrev.com/8e572f030ff5c4c695da5d40d3b617d4f6741d4f Cr-Commit-Position: refs/heads/master@{#12812}

Patch Set 1 #

Total comments: 1

Patch Set 2 : examples rewritten, few tests added #

Total comments: 8

Patch Set 3 : #

Patch Set 4 : Fix example #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -4 lines) Patch
M webrtc/base/task_queue.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/thread.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/thread_annotations.h View 2 chunks +5 lines, -0 lines 0 comments Download
M webrtc/base/thread_checker.h View 1 2 3 2 chunks +91 lines, -2 lines 0 comments Download
M webrtc/base/thread_checker_unittest.cc View 1 2 2 chunks +56 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
danilchap
prettified version of idea shown in https://codereview.webrtc.org/1967193002/ Wonder if this macros good enough to help ...
4 years, 7 months ago (2016-05-16 12:51:21 UTC) #1
tommi
Can we include some test code? https://codereview.webrtc.org/1981893002/diff/1/webrtc/base/thread_checker.h File webrtc/base/thread_checker.h (right): https://codereview.webrtc.org/1981893002/diff/1/webrtc/base/thread_checker.h#newcode130 webrtc/base/thread_checker.h:130: // encoder_queue_->PostTask([this] { ...
4 years, 7 months ago (2016-05-16 13:06:48 UTC) #3
danilchap
On 2016/05/16 13:06:48, tommi-webrtc wrote: > Can we include some test code? > > https://codereview.webrtc.org/1981893002/diff/1/webrtc/base/thread_checker.h ...
4 years, 7 months ago (2016-05-16 15:22:58 UTC) #5
danilchap
examples rewritten, using ref_ptr for lambda capture now. Tests are partially written since has no ...
4 years, 7 months ago (2016-05-18 15:28:53 UTC) #7
tommi
lgtm % a couple of requests. https://codereview.webrtc.org/1981893002/diff/20001/webrtc/base/thread_checker.h File webrtc/base/thread_checker.h (right): https://codereview.webrtc.org/1981893002/diff/20001/webrtc/base/thread_checker.h#newcode92 webrtc/base/thread_checker.h:92: class SCOPED_LOCKABLE AnnounceOnThread ...
4 years, 7 months ago (2016-05-19 08:26:14 UTC) #8
danilchap
https://codereview.webrtc.org/1981893002/diff/20001/webrtc/base/thread_checker.h File webrtc/base/thread_checker.h (right): https://codereview.webrtc.org/1981893002/diff/20001/webrtc/base/thread_checker.h#newcode92 webrtc/base/thread_checker.h:92: class SCOPED_LOCKABLE AnnounceOnThread { On 2016/05/19 08:26:14, tommi-webrtc wrote: ...
4 years, 7 months ago (2016-05-19 11:45:30 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1981893002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1981893002/60001
4 years, 7 months ago (2016-05-19 13:47:25 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 7 months ago (2016-05-19 13:49:07 UTC) #14
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 13:49:15 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/8e572f030ff5c4c695da5d40d3b617d4f6741d4f
Cr-Commit-Position: refs/heads/master@{#12812}

Powered by Google App Engine
This is Rietveld 408576698