Bug 15270 – use TLS to store Thread.getThis (pthread_getspecific causes heavy lock contention)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2015-10-31T03:32:00Z
Last change time
2016-01-03T14:10:09Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2015-10-31T03:32:35Z
Before 2.066 Thread.getThis() was stored in a plain TLS variable.
In order to fix issue 11981 this was changed to use pthread_getspecific.
Apparently this is a huge performance issue (see https://github.com/D-Programming-Language/druntime/pull/1419).
Comment #1 by github-bugzilla — 2015-10-31T16:34:05Z