a822d0bf0 ^
c6034277f ^
6195dbe49 ^
1 2 3
4
5 6
7 8
9 10 11 12
13
14 15
16
17 18
19
20 21
22
23 24 25 26 27 28 29 30 31
discard """ output: '''4 8''' cmd: "nim $target --threads:on $options $file" """ import threadpool var x, y = 0 proc p1 = for i in 0 .. 10_000: discard atomicInc x proc p2 = for i in 0 .. 10_000: discard atomicInc y, 2 for i in 0.. 3: spawn(p1()) spawn(p2()) sync() echo x echo y