even more strict isNil handling for strings/seqs in order to detect bugs
This commit is contained in:
parent
9047c3f582
commit
64517445ea
36 changed files with 193 additions and 245 deletions
|
|
@ -393,8 +393,9 @@ proc onThreadDestruction*(handler: proc () {.closure, gcsafe.}) =
|
|||
## A thread is destructed when the ``.thread`` proc returns
|
||||
## normally or when it raises an exception. Note that unhandled exceptions
|
||||
## in a thread nevertheless cause the whole process to die.
|
||||
if threadDestructionHandlers.isNil:
|
||||
threadDestructionHandlers = @[]
|
||||
when not defined(nimNoNilSeqs):
|
||||
if threadDestructionHandlers.isNil:
|
||||
threadDestructionHandlers = @[]
|
||||
threadDestructionHandlers.add handler
|
||||
|
||||
template afterThreadRuns() =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue