New issue
Advanced search Search tips

Issue 663632 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Introduce PerThreadData class to avoid defining per-thread classes using DEFINE_THREAD_SAFE_STATIC_LOCAL

Project Member Reported by nhiroki@chromium.org, Nov 9 2016

Issue description

Copied from https://codereview.chromium.org/2473483012/diff/60001/third_party/WebKit/Source/modules/background_sync/SyncManager.cpp

On 2016/11/08 07:11:36, haraken wrote:
> 
> nhiroki@: We might want to consider introducing a PerThreadData class to avoid
> defining per-thread classes like this with DEFINE_THREAD_SAFE_STATIC_LOCAL.
> 
> Ideally, the caller should be able to get the BackgroundSyncProvider by
> PerThreadData::current()->backgroundSyncProvider().
 
Making a proper way to make a per-thread object sounds reasonable, I'm not sure yet how we layer PerThreadData class (in wtf/??) and its contents like BackgroundSyncProvider (in modules/) though.
I'd put it in platform/threading/. wtf/ will be merged into platform/ soon.


Cc: kinuko@chromium.org
Components: Blink>Workers
Platform layer (used to) expose various per-thread interfaces for workers, have been thinking that having some collective per-thread interface for them would be nice.  So +1 for doing this.  I also think this should be at platform layer (platform/threading sounds good)

Comment 4 by falken@chromium.org, Nov 11 2016

Cc: -nhiroki@chromium.org
Owner: nhiroki@chromium.org
Status: Assigned (was: Untriaged)
Cc: shimazu@chromium.org
Cc: nhiroki@chromium.org
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment