Skip to content

spatial-monorepo


spatial-monorepo / editor/src / DXFWorkerHandle

Interface: DXFWorkerHandle

Defined in: packages/editor/src/dxf.worker.ts:44

Handle returned by createDXFWorker.

Issue #887: createDXFWorker() used to return only the bare Comlink proxy, discarding the underlying Worker handle in its closure — callers had no way to terminate() it, and releasing the Comlink proxy alone only closes the MessagePort, it does not stop the worker thread. Mirrors the { proxy, terminate() } pattern already used by createIMDFWorker, createWallBandsWorker, createRTLSWorker, createWayfindingWorker, and createPMTilesWorker.

Properties

proxy

proxy: Remote<{ parseDXF: DXFImportResult; }>

Defined in: packages/editor/src/dxf.worker.ts:46

Comlink-wrapped proxy for calling into the worker.

Methods

terminate()

terminate(): void

Defined in: packages/editor/src/dxf.worker.ts:54

Releases the Comlink proxy and terminates the underlying Worker thread. Comlink's [Comlink.releaseProxy] only closes the MessagePort — it does NOT stop the worker thread. Callers MUST call terminate() when the worker is no longer needed (e.g. on unmount) to avoid leaking a running Worker thread — see issue #887.

Returns

void

Released under commercial licensing.