接续L4-TOOL-DB浏览器Provider协议

结论:浏览器 Worker 已支持可插拔 Python runtime provider 的 line I/O,缺真实 Python/WASM runtime 时仍保持阻塞不解锁。
This commit is contained in:
2026-06-19 07:13:52 +08:00
parent 63870fd6d7
commit db33224dd0
6 changed files with 159 additions and 4 deletions

View File

@@ -96,7 +96,14 @@ export function createLinuxCncToolDbBrowserWorkerAdapter({
return result.line;
},
close() {
async close() {
if (worker) {
try {
await request("close");
} catch {
// The worker may be blocked or already gone; termination below is authoritative.
}
}
rejectPending(new Error("Tool DB browser worker closed."));
worker?.terminate();
worker = null;