mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
[std/rlocks]add inline pragma (#17773)
so that it can be used as the base of new locks module with destructors.
This commit is contained in:
@@ -33,15 +33,15 @@ proc deinitRLock*(lock: var RLock) {.inline.} =
|
||||
## Frees the resources associated with the lock.
|
||||
deinitSys(lock)
|
||||
|
||||
proc tryAcquire*(lock: var RLock): bool =
|
||||
proc tryAcquire*(lock: var RLock): bool {.inline.} =
|
||||
## Tries to acquire the given lock. Returns `true` on success.
|
||||
result = tryAcquireSys(lock)
|
||||
|
||||
proc acquire*(lock: var RLock) =
|
||||
proc acquire*(lock: var RLock) {.inline.} =
|
||||
## Acquires the given lock.
|
||||
acquireSys(lock)
|
||||
|
||||
proc release*(lock: var RLock) =
|
||||
proc release*(lock: var RLock) {.inline.} =
|
||||
## Releases the given lock.
|
||||
releaseSys(lock)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user