Added fixes from Araq's comments
This commit is contained in:
parent
0290bc2240
commit
c1028b3363
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Nim's Runtime Library
|
# Nim's Runtime Library
|
||||||
# (c) Copyright 2015 Andreas Rumpf
|
# (c) Copyright 2015 Anatoly Galiulin
|
||||||
#
|
#
|
||||||
# See the file "copying.txt", included in this
|
# See the file "copying.txt", included in this
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
|
|
@ -40,7 +40,7 @@ proc release*(lock: var RLock) =
|
||||||
## Releases the given lock.
|
## Releases the given lock.
|
||||||
releaseSys(lock)
|
releaseSys(lock)
|
||||||
|
|
||||||
template withRLock*(lock: var RLock, code: stmt): stmt =
|
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:
|
block:
|
||||||
acquire(lock)
|
acquire(lock)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue