diff --git a/lib/pure/ioselects/ioselectors_select.nim b/lib/pure/ioselects/ioselectors_select.nim index 2f22f1b305..eed64a34db 100644 --- a/lib/pure/ioselects/ioselectors_select.nim +++ b/lib/pure/ioselects/ioselectors_select.nim @@ -110,6 +110,7 @@ proc close*[T](s: Selector[T]) = when hasThreadSupport: deallocSharedArray(s.fds) deallocShared(cast[pointer](s)) + deinitLock(s.lock) when defined(windows): proc newSelectEvent*(): SelectEvent = diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 6b858c4bba..bf93b5e01d 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -41,6 +41,8 @@ ## for i in 0..high(thr): ## createThread(thr[i], threadFunc, (i*10, i*10+5)) ## joinThreads(thr) +## +## deinitLock(L) when not declared(ThisIsSystem): {.error: "You must not import this module explicitly".}