summary refs log blame commit diff stats
path: root/tests/parallel/tlet_spawn.nim
blob: 463ee1a4799352c96760e5630d2515c275f0c732 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                           
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()