fixes #71; sorry about the polling implementation
This commit is contained in:
parent
24e1d22ec9
commit
c6213c9774
6 changed files with 62 additions and 12 deletions
19
tests/threads/trecursive_actor.nim
Normal file
19
tests/threads/trecursive_actor.nim
Normal file
|
|
@ -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()
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue