'let' within 'parallel' now works
This commit is contained in:
parent
1a3b730bf5
commit
8930ba50b9
4 changed files with 21 additions and 6 deletions
14
tests/parallel/tlet_spawn.nim
Normal file
14
tests/parallel/tlet_spawn.nim
Normal file
|
|
@ -0,0 +1,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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue