summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorgenotrance <dev@genotrance.com>2018-07-05 05:30:27 -0500
committerAndreas Rumpf <rumpf_a@web.de>2018-07-05 12:30:27 +0200
commitf7b76c9ea71ca77d2ed32612b5770cd816672eeb (patch)
treeb4d86f431110363c4962ba5fd343eb17e8143180
parentc7cc93463233cba085db1f36746355848a27ae4d (diff)
downloadNim-f7b76c9ea71ca77d2ed32612b5770cd816672eeb.tar.gz
Revert "Test case for #5626 (#8204)" (#8206)
This reverts commit c7cc93463233cba085db1f36746355848a27ae4d.
-rw-r--r--tests/threads/t5626.nim27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/threads/t5626.nim b/tests/threads/t5626.nim
deleted file mode 100644
index e7024e5ed..000000000
--- a/tests/threads/t5626.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-import threadpool
-
-var ch: Channel[int]
-ch.open
-var pch = ch.addr
-
-proc run(f: proc(): int {.gcsafe.}): proc() =
-  let r = spawn f()
-  return proc() = await(r)
-
-var working = false
-
-proc handler(): int =
-  while true:
-    let (h, v) = pch[].tryRecv()
-    if not h:
-      discard cas(working.addr, true, false)
-      break
-  1
-
-proc send(x: int) =
-  ch.send(x)
-  if cas(working.addr, false, true):
-    discard run(handler)
-
-for x in 0..1000000:
-  send(x)
\ No newline at end of file