tuserlocks.nim 196 B

1234567891011121314
  1. discard """
  2. cmd: "nim $target --threads:on $options $file"
  3. """
  4. import rlocks
  5. var r: RLock
  6. r.initRLock()
  7. doAssert r.tryAcquire()
  8. doAssert r.tryAcquire()
  9. r.release()
  10. r.release()
  11. r.deinitRLock()