Skip to content

Commit 8f85498

Browse files
committed
fix(server): use shared keyed lock for terminal allocation
1 parent bf1ce05 commit 8f85498

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/server/src/terminal/ThreadTerminals.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import {
1616
} from "@t3tools/contracts";
1717
import { projectScriptRuntimeEnv } from "@t3tools/shared/projectScripts";
1818
import { nextTerminalId } from "@t3tools/shared/terminalLabels";
19+
import * as KeyedLock from "@t3tools/shared/KeyedLock";
1920
import * as Context from "effect/Context";
2021
import * as Effect from "effect/Effect";
2122
import * as Layer from "effect/Layer";
2223
import * as Option from "effect/Option";
2324
import * as Schema from "effect/Schema";
2425
import * as NodeUtil from "node:util";
2526
import * as Project from "../project/ProjectService.ts";
26-
import { makeKeyedSerialExecutor } from "../orchestration-v2/KeyedSerialExecutor.ts";
2727
import * as TerminalManager from "./Manager.ts";
2828

2929
const DEFAULT_OUTPUT_CHARACTERS = 10_000;
@@ -125,7 +125,7 @@ function plainText(history: string) {
125125
const make = Effect.gen(function* () {
126126
const terminals = yield* TerminalManager.TerminalManager;
127127
const projects = yield* Project.ProjectService;
128-
const opens = yield* makeKeyedSerialExecutor<string>();
128+
const opens = yield* KeyedLock.make<string>();
129129

130130
/** The thread's terminals from the metadata snapshot the terminal panel starts from. */
131131
const list: ThreadTerminals["Service"]["list"] = Effect.fn("ThreadTerminals.list")(

0 commit comments

Comments
 (0)