Add tests for examples from Nim in Action.

This commit is contained in:
Dominik Picheta 2017-10-01 17:17:40 +01:00
commit 7889c03cbc
34 changed files with 1213 additions and 0 deletions

View file

@ -0,0 +1,13 @@
import threadpool
var counter = 0
proc increment(x: int) =
for i in 0 .. <x:
let value = counter + 1
counter = value
spawn increment(10_000)
spawn increment(10_000)
sync()
echo(counter)