@operad-io/engine 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operad-io/engine",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -48,7 +48,10 @@ export function isBusy(error: unknown): boolean {
48
48
  * until the other writer commits, so nothing has to sleep and poll.
49
49
  */
50
50
  function waitForWriter(database: Database): void {
51
- database.transaction(() => undefined).immediate();
51
+ // A writer that keeps committing (a first open creating the schema on a slow
52
+ // disk) can hold the lock past the busy timeout with nothing stuck, so the
53
+ // wait goes on while the data version moves, as for any other write.
54
+ writeImmediate(database, () => undefined);
52
55
  }
53
56
 
54
57
  /**