async-changeset
Rich Harris 7 months ago
parent 5ddcc3e91c
commit 81565fe818

@ -374,6 +374,8 @@ export class Boundary {
}
export class Fork {
suspended = false;
/** @type {Boundary} */
#boundary;
@ -459,14 +461,14 @@ export class Fork {
}
increment() {
this.#pending_count++;
if (this.#pending_count++ === 0) {
this.suspended = true;
}
}
decrement() {
if (--this.#pending_count === 0) {
this.suspended = false;
// this.commit();
}
}

@ -359,6 +359,7 @@ export function template_effect(fn, sync = [], async = [], d = derived) {
}
create_template_effect(fn, [...sync.map(d), ...result]);
schedule_effect(effect);
unsuspend();
});

Loading…
Cancel
Save