deinitLock (#15383)

* deinitLock

* minor
This commit is contained in:
flywind 2020-09-22 19:07:31 +08:00 • committed by GitHub
commit ab05e141c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -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 =

View file

@ -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".}