initialize ctxPoolLock

This commit is contained in:
Ivan Folgueira Bande 2026-01-14 11:49:04 +01:00
parent fb8039c5a5
commit be4c283581
No known key found for this signature in database
GPG Key ID: 1176EA91791A9757

View File

@ -140,6 +140,7 @@ proc initializeLibrary() {.exported.} =
## Every Nim library needs to call `<yourprefix>NimMain` once exactly, to initialize the Nim runtime.
## Being `<yourprefix>` 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):