@ai-ecoverse/slicc-kernel 1.124.3 → 1.124.4

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.
@@ -5434,7 +5434,7 @@ var KERNEL_VERSION, OS_RELEASE;
5434
5434
  var init_version = __esm({
5435
5435
  "src/version.ts"() {
5436
5436
  "use strict";
5437
- KERNEL_VERSION = true ? "1.124.3" : "0.0.0-dev";
5437
+ KERNEL_VERSION = true ? "1.124.4" : "0.0.0-dev";
5438
5438
  OS_RELEASE = "6.0.0-slicc";
5439
5439
  }
5440
5440
  });
package/dist/node.js CHANGED
@@ -5825,15 +5825,21 @@ var UnlinkedKeeper = class {
5825
5825
  };
5826
5826
  const unreplaced = async (path, op) => {
5827
5827
  const at = fs.resolvePath("/", path);
5828
+ const pending = async () => {
5829
+ for (let p = at; replacing.size > 0; p = parentOf5(p)) {
5830
+ await replacing.get(p)?.done;
5831
+ if (p === "/") return;
5832
+ }
5833
+ };
5828
5834
  for (let attempt = 1; ; attempt++) {
5829
- await replacing.get(at)?.done;
5835
+ await pending();
5830
5836
  const seen = keeper.replaced;
5831
5837
  try {
5832
5838
  return await op();
5833
5839
  } catch (err) {
5834
5840
  const code = err?.code;
5835
5841
  if (attempt >= 3 || code !== "ENOENT") throw err;
5836
- await replacing.get(at)?.done;
5842
+ await pending();
5837
5843
  if (keeper.replaced === seen) throw err;
5838
5844
  }
5839
5845
  }
@@ -5858,9 +5864,11 @@ var UnlinkedKeeper = class {
5858
5864
  lstat: (path) => unreplaced(path, async () => counted3(await fs.lstat(path))),
5859
5865
  async rm(path, options) {
5860
5866
  const target = fs.resolvePath("/", path);
5861
- const pinned = await keeper.pin(target);
5862
- if (pinned.moved.has(target)) pinned.commit();
5863
- else await keeper.settle(pinned, () => fs.rm(path, options));
5867
+ await replace(target, async (gated) => {
5868
+ const pinned = await keeper.pin(target, gated);
5869
+ if (pinned.moved.has(target)) pinned.commit();
5870
+ else await keeper.settle(pinned, () => fs.rm(path, options));
5871
+ });
5864
5872
  },
5865
5873
  async rename(from, to) {
5866
5874
  const target = fs.resolvePath("/", to);
@@ -5895,9 +5903,22 @@ var UnlinkedKeeper = class {
5895
5903
  return held;
5896
5904
  }
5897
5905
  async pin(target, gated = () => void 0) {
5898
- const paths = [...this.heldWithin(target).keys()].sort();
5906
+ const paths = [];
5899
5907
  const releases = [];
5900
- for (const path of paths) releases.push(await this.gate.acquire(path));
5908
+ for (; ; ) {
5909
+ const fresh2 = [...this.heldWithin(target).keys()].filter((path) => !paths.includes(path));
5910
+ if (fresh2.length === 0) break;
5911
+ fresh2.sort();
5912
+ if (paths.some((path) => path > fresh2[0])) {
5913
+ for (const release of releases.splice(0)) release();
5914
+ fresh2.push(...paths.splice(0));
5915
+ fresh2.sort();
5916
+ }
5917
+ for (const path of fresh2) {
5918
+ paths.push(path);
5919
+ releases.push(await this.gate.acquire(path));
5920
+ }
5921
+ }
5901
5922
  gated();
5902
5923
  const now = this.heldWithin(target);
5903
5924
  const held = new Map(
@@ -6973,7 +6994,7 @@ function satisfies(version, range2) {
6973
6994
  }
6974
6995
 
6975
6996
  // src/version.ts
6976
- var KERNEL_VERSION = true ? "1.124.3" : "0.0.0-dev";
6997
+ var KERNEL_VERSION = true ? "1.124.4" : "0.0.0-dev";
6977
6998
  var OS_RELEASE = "6.0.0-slicc";
6978
6999
  function procVersion() {
6979
7000
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC