Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

fix: two rune bugs #1160

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rune/Rune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export class Rune<out T, out U = never> {
}

async *iter(runner: Runner = globalRunner) {
let time = runner.timeline.current
const primed = runner.prime(this)
primed.reference()
let time = runner.timeline.current
try {
while (time !== Infinity) {
const receipt = new Receipt()
Expand Down Expand Up @@ -366,6 +366,7 @@ class RunAsyncIter<T> extends RunStream<T> {
super(runner)
;(async () => {
for await (const value of fn()) {
if (!this.alive) break
this.push(value)
}
this.finish()
Expand Down