@poe-platform/safe-js 0.1.51 → 0.1.53

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.
@@ -8715,6 +8715,7 @@ var activeJob = new AsyncLocalStorage3();
8715
8715
  var SandboxJobQueue = class {
8716
8716
  running = false;
8717
8717
  pending = [];
8718
+ ready = [];
8718
8719
  idle = [];
8719
8720
  generation = 0;
8720
8721
  acquire(job) {
@@ -8757,7 +8758,12 @@ var SandboxJobQueue = class {
8757
8758
  }
8758
8759
  advance() {
8759
8760
  if (this.running) return;
8760
- const next = this.pending.shift();
8761
+ if (this.ready.length === 0 && this.pending.length > 0) {
8762
+ const empty = this.ready;
8763
+ this.ready = this.pending.reverse();
8764
+ this.pending = empty;
8765
+ }
8766
+ const next = this.ready.pop();
8761
8767
  if (next !== void 0) {
8762
8768
  next();
8763
8769
  } else {
@@ -32761,4 +32767,4 @@ export {
32761
32767
  FileSnapshotBackend,
32762
32768
  run
32763
32769
  };
32764
- //# sourceMappingURL=chunk-CZNLD2Z3.js.map
32770
+ //# sourceMappingURL=chunk-NQN7UBAH.js.map