diff options
Diffstat (limited to 'lib/core/locks.nim')
-rw-r--r-- | lib/core/locks.nim | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/core/locks.nim b/lib/core/locks.nim index 4e85474fb..766b7b536 100644 --- a/lib/core/locks.nim +++ b/lib/core/locks.nim @@ -16,12 +16,15 @@ type ## or not is unspecified! TCond* = TSysCond ## Nim condition variable - LockEffect* = object of RootEffect ## effect that denotes that some lock operation - ## is performed - AquireEffect* = object of LockEffect ## effect that denotes that some lock is - ## aquired - ReleaseEffect* = object of LockEffect ## effect that denotes that some lock is - ## released + LockEffect* {.deprecated.} = object of RootEffect ## \ + ## effect that denotes that some lock operation + ## is performed. Deprecated, do not use anymore! + AquireEffect* {.deprecated.} = object of LockEffect ## \ + ## effect that denotes that some lock is + ## aquired. Deprecated, do not use anymore! + ReleaseEffect* {.deprecated.} = object of LockEffect ## \ + ## effect that denotes that some lock is + ## released. Deprecated, do not use anymore! {.deprecated: [FLock: LockEffect, FAquireLock: AquireEffect, FReleaseLock: ReleaseEffect].} @@ -33,15 +36,15 @@ proc deinitLock*(lock: var TLock) {.inline.} = ## Frees the resources associated with the lock. deinitSys(lock) -proc tryAcquire*(lock: var TLock): bool {.tags: [AquireEffect].} = +proc tryAcquire*(lock: var TLock): bool = ## Tries to acquire the given lock. Returns `true` on success. result = tryAcquireSys(lock) -proc acquire*(lock: var TLock) {.tags: [AquireEffect].} = +proc acquire*(lock: var TLock) = ## Acquires the given lock. acquireSys(lock) -proc release*(lock: var TLock) {.tags: [ReleaseEffect].} = +proc release*(lock: var TLock) = ## Releases the given lock. releaseSys(lock) |