mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 02:03:59 +00:00
'let' within 'parallel' now works
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user