mirror of https://github.com/deavmi/tasky.git
Descriptor queue safety fix
Fixed a bug whereby if one were to get new Descriptor classes across several threads then the Mutex for the descriptor queue would be reinitialzied upon static initialization of the thread as the static initialization block was not set to __gshared, causing a global re-write of a re-initted Mutex, never the same Mutex
This commit is contained in:
parent
8ede79bf49
commit
2251a00284
|
@ -110,11 +110,8 @@ public abstract class Descriptor : Signal
|
|||
/**
|
||||
* Static initialization of the descriptor
|
||||
* class ID queue's lock
|
||||
*
|
||||
* FIXME: BIG BUG FOR MULTITHREADED THIS MUST BE SET TO GSHARED TOO, else each thread
|
||||
* will be overwriting the global descQueuLock
|
||||
*/
|
||||
static this()
|
||||
__gshared static this()
|
||||
{
|
||||
descQueueLock = new Mutex();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue