exupery-core-async
Version:
async types for Exupery
16 lines (15 loc) • 746 B
TypeScript
export type I_Async_Monitor = {
readonly 'report process started': () => void;
readonly 'report process finished': () => void;
};
/**
* this function helps in keeping track of ongoing async operations
* async operations are registered and when finished reported as such.
* when all ongoing operations are finished the onEnd callback is called
*
* this function is specifically useful for async map functions
*
* @param callback this callback creates a scope within which the counter is provided
* @param onEnd this callback will be called when all ongoing operations are finished
*/
export declare function create_asynchronous_processes_monitor(monitoring_phase: ($: I_Async_Monitor) => void, on_all_finished: () => void): void;