bugfix: onThreadDestruction callbacks should be run in reverse order

This commit is contained in:
Andreas Rumpf 2017-01-26 11:28:25 +01:00
commit f7e3addb89

View file

@ -350,7 +350,7 @@ template beforeThreadRuns() =
threadCreationHandlers[i]() threadCreationHandlers[i]()
template afterThreadRuns() = template afterThreadRuns() =
for i in 0..countThreadDestructionHandlers-1: for i in countdown(countThreadDestructionHandlers-1, 0):
threadDestructionHandlers[i]() threadDestructionHandlers[i]()
proc runOnThreadCreationHandlers*() = proc runOnThreadCreationHandlers*() =