bugfix: bottom of AVL tree is now threadsafe

This commit is contained in:
Andreas Rumpf 2016-09-22 11:32:12 +02:00
commit bc53d2c9de
3 changed files with 7 additions and 5 deletions

View file

@ -356,6 +356,8 @@ proc threadProcWrapStackFrame[TArg](thrd: ptr Thread[TArg]) =
template threadProcWrapperBody(closure: expr) {.immediate.} =
when declared(globalsSlot): threadVarSetValue(globalsSlot, closure)
when declared(initAllocator):
initAllocator()
var thrd = cast[ptr Thread[TArg]](closure)
threadProcWrapStackFrame(thrd)
# Since an unhandled exception terminates the whole process (!), there is