-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
For example, given this generator:
const j = (async function* () {
for (let j = 0; true; ++j) {
yield j;
await new Promise((resolve) => setTimeout(resolve, 1000));
}
})();If you reference the value of j like so:
The value of j is: ${j}.Then everything works as expected. But, if you delete the reference to j, save, and then restore the reference to j, then j will resolve to undefined instead of incrementing once per second. I would guess that this has something to do with the generator being consumed lazily, and something bad is happening if there is no longer a downstream observer. 🤔
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn’t workingSomething isn’t working