new actors implementation for nimrod; compiler's generics still not up for the task though

This commit is contained in:
Araq 2011-08-29 01:14:26 +02:00
commit 4839800c22
8 changed files with 98 additions and 181 deletions

View file

@ -19,7 +19,8 @@ include "lib/system/syslocks"
type
TLock* = TSysLock ## Nimrod lock; whether this is re-entrant
## or not is unspecified!
## or not is unspecified! However, compilation
## in preventDeadlocks-mode guarantees re-entrancy.
TCond* = TSysCond ## Nimrod condition variable
const
@ -50,7 +51,7 @@ proc DeinitLock*(lock: var TLock) {.inline.} =
## Frees the resources associated with the lock.
DeinitSys(lock)
proc TryAcquire*(lock: var TLock): bool {.inline.} =
proc TryAcquire*(lock: var TLock): bool =
## Tries to acquire the given lock. Returns `true` on success.
result = TryAcquireSys(lock)
when noDeadlocks: