Files
Nim/tests/stdlib/uselocks.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

17 lines
247 B
Nim

import locks
import std/assertions
type MyType* [T] = object
lock: Lock
proc createMyType*[T]: MyType[T] =
initLock(result.lock)
proc use* (m: var MyType): int =
withLock m.lock:
result = 3
block:
var l: Lock
doAssert $l == "()"