diff options
author | Araq <rumpf_a@web.de> | 2014-12-08 08:42:18 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-12-08 08:42:18 +0100 |
commit | 08fcc87986c85ea86a0e3183b5b9027c8a117097 (patch) | |
tree | 763028d14bc63b13a3420418c5683b49390d0920 /lib | |
parent | c7664e7025cb63adb29f44bda8a8d41d4f65a967 (diff) | |
download | Nim-08fcc87986c85ea86a0e3183b5b9027c8a117097.tar.gz |
deprecated old locking effects
Diffstat (limited to 'lib')
-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) |