bugfix: onThreadDestruction callbacks should be run in reverse order

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

View File

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