diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-01-26 11:28:25 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-01-26 11:28:25 +0100 |
commit | f7e3addb890d781a6c2c11a5c6ce0f28ca0881cd (patch) | |
tree | 95d4c69bd50d49dfee06ff4861a6440a89853081 | |
parent | 05a3c1b10a87c26b396aafbd72852db37dd0b378 (diff) | |
download | Nim-f7e3addb890d781a6c2c11a5c6ce0f28ca0881cd.tar.gz |
bugfix: onThreadDestruction callbacks should be run in reverse order
-rw-r--r-- | lib/system/threads.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 039a9f2e1..f72395fd2 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -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*() = |