diff options
author | Araq <rumpf_a@web.de> | 2011-12-05 21:43:45 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-12-05 21:43:45 +0100 |
commit | c6213c9774707b74662646dd0241e5b5e9c9313d (patch) | |
tree | e80f5ac0039f85c2ce32cb7e6ab2bab97f8a3b51 /tests | |
parent | 24e1d22ec9b6361a2e2ae607a1ed69cca51ac1b2 (diff) | |
download | Nim-c6213c9774707b74662646dd0241e5b5e9c9313d.tar.gz |
fixes #71; sorry about the polling implementation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/tuserassert.nim | 1 | ||||
-rw-r--r-- | tests/specials.nim | 1 | ||||
-rw-r--r-- | tests/threads/trecursive_actor.nim | 19 |
3 files changed, 20 insertions, 1 deletions
diff --git a/tests/run/tuserassert.nim b/tests/run/tuserassert.nim index 958da2fe1..cf12c4e8b 100644 --- a/tests/run/tuserassert.nim +++ b/tests/run/tuserassert.nim @@ -5,7 +5,6 @@ discard """ template myAssert(cond: expr) = when rand(3) < 2: let c = cond.astToStr - {.warning: "code activated: " & c.} if not cond: echo c, "ugh" diff --git a/tests/specials.nim b/tests/specials.nim index 1f3013e90..a1aa1bc5a 100644 --- a/tests/specials.nim +++ b/tests/specials.nim @@ -118,6 +118,7 @@ proc runThreadTests(r: var TResults, options: string) = test "tactors" test "threadex" + test "trecursive_actor" #test "threadring" #test "tthreadanalysis" #test "tthreadsort" diff --git a/tests/threads/trecursive_actor.nim b/tests/threads/trecursive_actor.nim new file mode 100644 index 000000000..e2774704c --- /dev/null +++ b/tests/threads/trecursive_actor.nim @@ -0,0 +1,19 @@ +discard """ + outputsub: "0" +""" + +import actors + +var + a: TActorPool[int, void] +createActorPool(a) + +proc task(i: int) {.thread.} = + echo i + if i != 0: a.spawn (i-1, task) + +# count from 9 till 0 and check 0 is somewhere in the output +a.spawn(9, task) +a.join() + + |