Skip to content

Commit

Permalink
Fix microtask starvation race.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoestringresearch committed Nov 3, 2023
1 parent 381e456 commit c738d18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/examples/IDBContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class IDBContext {
async sync() {
// Wait until all transactions since the previous sync have committed.
// Throw if any transaction failed.
await this.#runChain;
await this.#putChain;
this.#putChain = Promise.resolve();
}
Expand Down

0 comments on commit c738d18

Please sign in to comment.