var count = 0 -- Counts iterations.
var fiber = coinit fib(30)
var res = 0
while fiber.status() != #done:
res = coresume fiber
count += 1
print '{res} {count}'
doesn't seem to work for me (just updated to cyber 0.2). If I run it as it is, I get
CompileError: Unsupported node
/.../hello.cy:18:25:
while fiber.status() != #done:
^
From how I understand the docs, it should be while fiber.status() != '#done':, no? However, if I use that, the code just goes into an infinite loop.
the example on https://cyberscript.dev/index.html
doesn't seem to work for me (just updated to cyber 0.2). If I run it as it is, I get
From how I understand the docs, it should be
while fiber.status() != '#done':
, no? However, if I use that, the code just goes into an infinite loop.update just found the solution here:
while fiber.status() != .done: