Merge pull request #4855 from ftsf/fix-foreignthreads

call initAllocator in foreign thread
This commit is contained in:
Andreas Rumpf
2016-10-05 17:38:37 +02:00
committed by GitHub

View File

@@ -120,6 +120,7 @@ when allowForeignThreadGc:
## switches are used
if not localGcInitialized:
localGcInitialized = true
initAllocator()
var stackTop {.volatile.}: pointer
setStackBottom(addr(stackTop))
initGC()