summary refs log tree commit diff stats
path: root/tests/async/t6100.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/async/t6100.nim')
-rw-r--r--tests/async/t6100.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/async/t6100.nim b/tests/async/t6100.nim
new file mode 100644
index 000000000..b4dc0f146
--- /dev/null
+++ b/tests/async/t6100.nim
@@ -0,0 +1,15 @@
+discard """
+  file: "t6100.nim"
+  exitcode: 0
+  output: "10000000"
+"""
+import asyncdispatch
+
+let done = newFuture[int]()
+done.complete(1)
+
+proc asyncSum: Future[int] {.async.} =
+  for _ in 1..10_000_000:
+    result += await done
+
+echo waitFor asyncSum()
\ No newline at end of file