restore the batch id check in BranchManager#commit and carry blocking_pending through #merge

async-another-try-pt-1-prune
Nic 18 hours ago
parent 28fb668d48
commit 00fbd15467

@ -110,14 +110,16 @@ export class BranchManager {
}
}
for (const [b, k] of this.#batches) {
this.#batches.delete(b);
this.#batches.delete(batch);
if (b === batch) {
for (const [b, k] of this.#batches) {
if (b.id > batch.id) {
// keep values for newer batches
break;
continue;
}
this.#batches.delete(b);
const offscreen = this.#offscreen.get(k);
if (offscreen) {

@ -621,6 +621,12 @@ export class Batch {
}
this.#pending += batch.#pending;
if (batch.#blocking_pending !== null) {
const blocking_pending = (this.#blocking_pending ??= new Map());
for (const [effect, count] of batch.#blocking_pending) {
blocking_pending.set(effect, (blocking_pending.get(effect) ?? 0) + count);
}
}
for (const c of batch.#commit_callbacks) {
this.oncommit(() => c(batch));

Loading…
Cancel
Save