mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
13 lines
354 B
TypeScript
13 lines
354 B
TypeScript
import { RuntimeRpcCallQueuePool } from '../../shared/runtime-rpc-call-queue'
|
|
|
|
const runtimeCallQueuePool = new RuntimeRpcCallQueuePool()
|
|
|
|
export function enqueueRuntimeCall<T>(
|
|
selector: string,
|
|
method: string,
|
|
run: () => Promise<T>,
|
|
signal?: AbortSignal
|
|
): Promise<T> {
|
|
return runtimeCallQueuePool.enqueue(selector, method, run, 0, signal)
|
|
}
|