[Issue 15270] use TLS to store Thread.getThis (pthread_getspecific causes heavy lock contention)

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Oct 31 09:34:05 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15270

--- Comment #1 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/druntime

https://github.com/D-Programming-Language/druntime/commit/e226ff2bd26b1941ddadfa0b30ca4f162901ab13
fix Issue 15270 - use TLS to store Thread.getThis

- as signals are no longer send during thread startup we can use
  a TLS variable to store Thread.getThis()
- make sure to set the variable (and probably trigger lazy TLS
  allocation) before adding the Thread to the global list

https://github.com/D-Programming-Language/druntime/commit/c2c255ce0be5deacd2df61df5135769727983173
Merge pull request #1422 from MartinNowak/fix15670

fix Issue 15270 - use TLS to store Thread.getThis

--


More information about the Digitalmars-d-bugs mailing list