summary refs log blame commit diff stats
path: root/tests/threads/trecursive_actor.nim
blob: e2774704c4d37a175c0063d94ada64fd5cde7733 (plain) (tree)


















                                                            
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()