Files
Nim/tests/parallel/tlet_spawn.nim
2014-09-22 08:34:05 +02:00

15 lines
225 B
Nim

import threadpool
proc foo(): int = 999
# test that the disjoint checker deals with 'a = spawn f(); g = spawn f()':
proc main =
parallel:
let f = spawn foo()
let b = spawn foo()
echo "done", f, " ", b
main()