Added rlocks module to documentation and news.txt
This commit is contained in:
parent
c1028b3363
commit
b0eeacf71e
5 changed files with 14 additions and 5 deletions
|
|
@ -1,13 +1,13 @@
|
|||
#
|
||||
#
|
||||
# Nim's Runtime Library
|
||||
# (c) Copyright 2015 Anatoly Galiulin
|
||||
# (c) Copyright 2016 Anatoly Galiulin
|
||||
#
|
||||
# See the file "copying.txt", included in this
|
||||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
## This module contains Nim's support for reentrant locks
|
||||
## This module contains Nim's support for reentrant locks.
|
||||
|
||||
include "system/syslocks"
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ proc release*(lock: var RLock) =
|
|||
releaseSys(lock)
|
||||
|
||||
template withRLock*(lock: var RLock, code: untyped): untyped =
|
||||
## Acquires the given lock and then executes the code
|
||||
## Acquires the given lock and then executes the code.
|
||||
block:
|
||||
acquire(lock)
|
||||
defer:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue