mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* Locks modules should give a compile error when threads are not enabled. * fix the compile flags to make the tests pass, or ignore files where necessary. * Fixed when statement to account for doc builds.
16 lines
257 B
Nim
16 lines
257 B
Nim
discard """
|
|
cmd: "nim $target --threads:on $options $file"
|
|
output: '''
|
|
'''
|
|
"""
|
|
|
|
import sharedtables
|
|
|
|
var table: SharedTable[int, int]
|
|
|
|
init(table)
|
|
table[1] = 10
|
|
assert table.mget(1) == 10
|
|
assert table.mgetOrPut(3, 7) == 7
|
|
assert table.mgetOrPut(3, 99) == 7
|