Worker object that contains all functions that will be executed in parallel
Functions should be using CPU-parallelism not IO-parallelism
Most functions should be synchronous, not asynchronous
Making them asynchronous does not make a difference to the caller
The caller must always await because the functions will run on the pool
Type declaration
isRunningInWorker:function
isRunningInWorker(): boolean
Check if we are running in the worker.
Only used for testing
Returns boolean
sleep:function
sleep(ms): void
Sleep synchronously
This blocks the entire event loop
Only used for testing
Worker object that contains all functions that will be executed in parallel Functions should be using CPU-parallelism not IO-parallelism Most functions should be synchronous, not asynchronous Making them asynchronous does not make a difference to the caller The caller must always await because the functions will run on the pool