Files
Nim/tests/stdlib/tuserlocks.nim
ringabout 3d2f0e2c7c make more standard libraries work with nimPreviewSlimSystem (#20343)
* make more standard libraries work with `nimPreviewSlimSystem`

* typo

* part two

* Delete specutils.nim

* fixes more tests

* more fixes

* fixes tests

* fixes three more tests

* add formatfloat import

* fix

* last
2022-09-27 20:06:23 +02:00

22 lines
264 B
Nim

discard """
matrix: "--threads:on"
"""
import std/rlocks
import std/assertions
var r: RLock
r.initRLock()
doAssert r.tryAcquire()
doAssert r.tryAcquire()
r.release()
r.release()
block:
var x = 12
withRLock r:
inc x
doAssert x == 13
r.deinitRLock()