I've looked at std/tasks page in the stdlib, and cannot understand why's first
block does not work:
import std/tasks
type
Runnable = ref object
data: int
proc hello(a: Runnable) =
a.data += 2
block:
let x = Runnable(data: 12)
let b = toTask hello(x) # error ----> expression cannot be isolated: x
b.invoke()
block:
let c = toTask(hello(Runnable(data: 12)))
c.invoke()
Runsimply because in the first block I initialized `Runnable` outside of arguments list?
