UNPKG

@arrows/worker

Version:

Simple, promise-based API for native worker threads (with pools)

13 lines (12 loc) 405 B
import { Work } from "./types"; /** * Defines a worker that can be later used with `spawn` function. * * Use when you want to separate worker definition from spawning a thread pool. * * @param handler Function that performs calculations inside worker threads * @returns Nothing, just defines a worker for use with `spawn` function */ declare const work: Work; export { work }; export default work;