summary refs log tree commit diff stats
path: root/tests/threads/trecursive_actor.nim
blob: d7072aa531f13d89f27d4fa9636ba0d74eb2dc66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
discard """
  disabled: yes
  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()