UNPKG

delphirtl

Version:
12 lines (11 loc) 320 B
/** * Runs a function in a thread * * @template T * @param {() => T} fn The function to run in a thread * @returns {Promise<T>} * @category Threads */ declare function runInThread<T>(fn: () => T): Promise<T>; export { runInThread, }; export { isMainThread, Worker, parentPort, workerData } from 'worker_threads';