node-ejs-renderer/node_modules/thingies/lib/codeMutex.d.ts

7 lines
268 B
TypeScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
import type { Code } from './types';
/**
* Executes only one instance of give code at a time. If other calls come in in
* parallel, they get resolved to the result of the ongoing execution.
*/
export declare const codeMutex: <T>() => (code: Code<T>) => Promise<T>;