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

Issue 1967193002: ThreadScope concept to check variable accessed on correct thread (Closed)

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

Description

ThreadScope concept to check variable accessed on correct thread half-runtime, mostly compile-time COMMIT=false R=tommi@webrtc.org,pbos@webrtc.org

Patch Set 1 #

Patch Set 2 : generalized ThreadScope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -12 lines) Patch
M webrtc/base/thread.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M webrtc/base/thread_checker.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
A webrtc/base/thread_scope.h View 1 1 chunk +57 lines, -0 lines 0 comments Download
M webrtc/p2p/stunprober/stunprober.cc View 1 4 chunks +4 lines, -3 lines 0 comments Download
M webrtc/pc/channel.h View 1 3 chunks +4 lines, -2 lines 0 comments Download
M webrtc/pc/channel.cc View 1 5 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
danilchap
4 years, 7 months ago (2016-05-11 17:31:08 UTC) #1
tommi
On 2016/05/11 17:31:08, danilchap wrote: What to you think about making rtc::ThreadChecker lockable instead and ...
4 years, 7 months ago (2016-05-12 09:39:12 UTC) #2
danilchap
4 years, 7 months ago (2016-05-12 11:04:55 UTC) #3
On 2016/05/12 09:39:12, tommi-webrtc wrote:
> On 2016/05/11 17:31:08, danilchap wrote:
> 
> What to you think about making rtc::ThreadChecker lockable instead and have a
> utility class that DCHECKs CalledOnValidThread?
> (in addition to calling a noop unlock function)

making rtc::ThreadChecker lockable would allow to test any thread, not just
rtc::Thread,
but I do not see a reason do do it 'instead': ThreadScope can easily do both
(sample uploaded).

Powered by Google App Engine
This is Rietveld 408576698