MCPcopy Create free account
hub / github.com/cloudflare/computer / #invalidateHandle

Method #invalidateHandle

packages/computer/src/workspace.ts:685–690  ·  view source on GitHub ↗
(id: string, handle: BackendHandle)

Source from the content-addressed store, hash-verified

683 // not be clobbered. Returns true if the cached entry was the one
684 // we removed.
685 #invalidateHandle(id: string, handle: BackendHandle): boolean {
686 if (this.#handles.get(id) !== handle) return false;
687 this.#handles.delete(id);
688 this.#shells.delete(id);
689 return true;
690 }
691
692 // Wrap an RPC-backed operation so a transport failure invalidates
693 // the cached handle before the error rethrows. Non-transport

Callers 2

#runWithInvalidationMethod · 0.95
#onShellErrorMethod · 0.95

Calls 2

getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected