diff --git a/library/libsds.nim b/library/libsds.nim index 59881c5..878ec1a 100644 --- a/library/libsds.nim +++ b/library/libsds.nim @@ -140,6 +140,7 @@ proc initializeLibrary() {.exported.} = ## Every Nim library needs to call `NimMain` once exactly, to initialize the Nim runtime. ## Being `` the value given in the optional compilation flag --nimMainPrefix:yourprefix libsdsNimMain() + ctxPoolLock.initLock() # ensure the lock is initialized once (fix Windows crash) when declared(setupForeignThreadGc): setupForeignThreadGc() when declared(nimGC_setStackBottom):