deinitializing locks at program exit (#19043)
* deinitializing locks at program exit * deinitLock shouldn't be called for js backend I guess... * I suppose this is the best way to detect the ewruntime option * I guess I need these guards here too... * fixing merge conflict
This commit is contained in:
parent
141b76e365
commit
582468da1c
2 changed files with 35 additions and 24 deletions
|
|
@ -44,6 +44,9 @@ proc callClosures() {.noconv.} =
|
|||
of kClosure: fun.fun1()
|
||||
of kNoconv: fun.fun2()
|
||||
|
||||
when not defined(js) and not defined(nimOwnedEnabled):
|
||||
deinitLock(gFunsLock)
|
||||
|
||||
template fun() =
|
||||
if gFuns.len == 0:
|
||||
addAtExit(callClosures)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue