sync with the same template from locks module (#18414)

This commit is contained in:
Antonis Geralis 2021-07-10 09:41:07 +03:00 • committed by GitHub
commit 48ef832cf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ proc release*(lock: var RLock) {.inline.} =
## Releases the given lock. ## Releases the given lock.
releaseSys(lock) releaseSys(lock)
template withRLock*(lock: var RLock, code: untyped): untyped = template withRLock*(lock: RLock, code: untyped) =
## Acquires the given lock and then executes the code. ## Acquires the given lock and then executes the code.
acquire(lock) acquire(lock)
{.locks: [lock].}: {.locks: [lock].}: