|Title||Race condition in EventInit()|
|Assigned user||Gareth Rees|
|Description||There is only one event system (shared between all arenas) and so EventInit() needs to run only once even if there are multiple arenas. Its initialization is guarded with|
/* ... */
eventInited = TRUE;
but this is obviously not safe if two threads create arenas at the same time.
|Analysis||A special case of job003387.|
We could take the global binary lock while initializing the event system.
|Created by||Gareth Rees|
|Created on||2013-05-30 14:46:17|
|Last modified by||Richard Brooksby|
|Last modified on||2016-04-12 18:16:06|
|History||2013-05-30 GDR Created|
|191018||closed||2016-04-12 18:16:06||Richard Brooksby||Guarding EventInit with the global lock, and removing the enforcement of the reference count, so that the event system can be used from classes, which get called before any arena.|