[M3commit] [modula3/cm3] d88a3a: Fix race condition during startup.
GitHub
noreply at github.com
Sat Jul 30 23:18:32 CEST 2016
Branch: refs/heads/master
Home: https://github.com/modula3/cm3
Commit: d88a3a220a92e73b8e954761e39009d499424e09
https://github.com/modula3/cm3/commit/d88a3a220a92e73b8e954761e39009d499424e09
Author: Jay Krell <jay.krell at cornell.edu>
Date: 2016-07-30 (Sat, 30 Jul 2016)
Changed paths:
M m3-libs/m3core/src/thread/WIN32/ThreadWin32.m3
Log Message:
-----------
Fix race condition during startup.
The problem with the code is subtle.
The globals are refetched after the critical section is left,
however a race still exists if many threads are created right
at startup, the overwrite of slots outside the lock can result
in preexisting threads (that were just prior created) being lost.
More information about the M3commit
mailing list