MCPcopy Create free account
hub / github.com/dzcode-io/dzcode.io / QueueObject

Interface QueueObject

packages/utils/src/concurrency/index.ts:3–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1type Callback = (resolved?: unknown, rejected?: unknown) => void;
2
3interface QueueObject {
4 args: unknown;
5 callbacks: Callback[];
6}
7
8export const lock = <T extends (...args: any) => Promise<any>>(func: T): T => {
9 const queue: Record<string, QueueObject> = {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected