Hi,
I would like to have a shared mutable state (say, a number) which I modify periodically (once per second).
However, the mutator function is currently executed automatically, because it depends on the shared value being mutated. What is the recommended way of doing this?
I am trying:
mutable value = 0;
function mutate() { mutable value = value+1; }
loop = {
while (1) {
mutate();
yield Promises.delay(1000);
}
}
…this loops as fast as possible