[D-runtime] [D-Programming-Language/druntime] 7ec652: simplify handling of thread starts and GC suspend
GitHub via D-runtime
d-runtime at puremagic.com
Sat Oct 31 09:34:02 PDT 2015
Branch: refs/heads/master
Home: https://github.com/D-Programming-Language/druntime
Commit: 7ec6520adc92c4fcdef003efb1c348ec5d78f217
https://github.com/D-Programming-Language/druntime/commit/7ec6520adc92c4fcdef003efb1c348ec5d78f217
Author: Martin Nowak <code at dawg.eu>
Date: 2015-10-31 (Sat, 31 Oct 2015)
Changed paths:
M src/core/thread.d
Log Message:
-----------
simplify handling of thread starts and GC suspend
- only keep threads in global thread list while they are running
this directly avoids any issues with signals delivered during
thread startup
- add an aboutToStart array to keep track of just spawned threads
this is needed so that thread_joinAll doesn't miss a thread
also the windows dll_attach_thread code looks up a just spawned thread
- remove all the misleading comments
- remove all the cargo cult handling of situations that can no longer
occur, e.g. suspendDepth being set while adding a thread
Commit: e226ff2bd26b1941ddadfa0b30ca4f162901ab13
https://github.com/D-Programming-Language/druntime/commit/e226ff2bd26b1941ddadfa0b30ca4f162901ab13
Author: Martin Nowak <code at dawg.eu>
Date: 2015-10-31 (Sat, 31 Oct 2015)
Changed paths:
M src/core/thread.d
Log Message:
-----------
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
Commit: 20f035005db31801ac53bb60a5a12a8bd70d534d
https://github.com/D-Programming-Language/druntime/commit/20f035005db31801ac53bb60a5a12a8bd70d534d
Author: Martin Nowak <code at dawg.eu>
Date: 2015-10-31 (Sat, 31 Oct 2015)
Changed paths:
M src/core/thread.d
Log Message:
-----------
fix race condition on m_addr
- between pthread_create(&m_addr) and reading m_addr to
asserting isRunning when adding the newly created thread
- this race existed before but didn't manifest b/c the thread was added
by the starting thread (after pthread_create) returned
- check isRunning after acquiring slock to ensure pthread_create already
returned
Commit: c2c255ce0be5deacd2df61df5135769727983173
https://github.com/D-Programming-Language/druntime/commit/c2c255ce0be5deacd2df61df5135769727983173
Author: David Nadlinger <code at klickverbot.at>
Date: 2015-10-31 (Sat, 31 Oct 2015)
Changed paths:
M src/core/thread.d
Log Message:
-----------
Merge pull request #1422 from MartinNowak/fix15670
fix Issue 15270 - use TLS to store Thread.getThis
Compare: https://github.com/D-Programming-Language/druntime/compare/713aa0568a0b...c2c255ce0be5
More information about the D-runtime
mailing list