eager batches don't need to run inside forks and don't need to notify them

async-another-try
Simon Holthausen 2 days ago
parent 7509485eca
commit df50aa8384
No known key found for this signature in database

@ -876,7 +876,7 @@ export class Batch {
source.wv = wv;
}
for (let batch = first_batch; batch !== null; batch = batch.next) {
for (let batch = first_batch; batch !== null && !this.is_eager; batch = batch.next) {
if (batch.id < this.id && batch.current.has(source)) {
this.dependent.add(batch);
}
@ -1470,7 +1470,7 @@ export function eager(fn) {
get(version);
eager_effect(() => {
if (initial) {
if (initial && !current_batch?.is_fork) {
// the first time this runs, we create an eager effect
// that will run eagerly whenever the expression changes
var previous_batch_values = batch_values;

Loading…
Cancel
Save