MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / nudgeNativeHandleRelease

Function nudgeNativeHandleRelease

apps/local/src/db/v1-v2-migration.ts:1010–1013  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1008// runs the finalizer, releasing the handle so a follow-up rename/rm succeeds.
1009// No-op outside the Bun runtime (e.g. vitest on Node), where this is unneeded.
1010const nudgeNativeHandleRelease = (): void => {
1011 const bun = (globalThis as { Bun?: { gc?: (sync: boolean) => void } }).Bun;
1012 bun?.gc?.(true);
1013};
1014
1015// Windows reports EBUSY/EPERM on rename for a short window after a SQLite
1016// handle closes (handle release lags the close call, and antivirus scanners

Callers 2

renameWithRetryFunction · 0.85
rmWithRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected