Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

418 B
Raw Blame
import type { ProcessSandbox, ProcessState, SandboxHandle } from "./sandbox.ts";
import { pollProcess } from "./process-poll.ts";

export async function awaitProcessExit(
  sandbox: ProcessSandbox,
  handle: SandboxHandle,
  processId: string,
  graceMs: number,
): Promise<ProcessState> {
  const { status } = await pollProcess(sandbox, handle, processId, { deadlineMs: graceMs, collect: false });
  return status;
}