summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-09-22 08:34:05 +0200
committerAraq <rumpf_a@web.de>2014-09-22 08:34:05 +0200
commit8930ba50b99be7cd508a5d3284ef278ccb736767 (patch)
treeba899e0dded94493334034d868f5756cea5810bd /tests
parent1a3b730bf5a2e5978d2dad3d8fb4c157134535e7 (diff)
downloadNim-8930ba50b99be7cd508a5d3284ef278ccb736767.tar.gz
'let' within 'parallel' now works
Diffstat (limited to 'tests')
-rw-r--r--tests/parallel/tlet_spawn.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/parallel/tlet_spawn.nim b/tests/parallel/tlet_spawn.nim
new file mode 100644
index 000000000..463ee1a47
--- /dev/null
+++ b/tests/parallel/tlet_spawn.nim
@@ -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()