Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
export type {
IPool,
PoolEmitter,
- PoolOptions,
PoolEvent,
+ PoolOptions,
PoolType,
TasksQueueOptions
} from './pools/pool'
export type { KillBehavior, WorkerOptions } from './worker/worker-options'
export type {
Draft,
- PromiseResponseWrapper,
MessageValue,
+ PromiseResponseWrapper,
+ TaskFunctions,
WorkerAsyncFunction,
WorkerFunction,
WorkerSyncFunction
| WorkerSyncFunction<Data, Response>
| WorkerAsyncFunction<Data, Response>
/**
- * Worker functions object that can be executed.
+ * Worker functions that can be executed object.
* This object can contain synchronous or asynchronous functions.
* The key is the name of the function.
* The value is the function itself.
*/
protected messageListener (message: MessageValue<Data, MainWorker>): void {
if (message.id != null && message.data != null) {
- const fn = this.getTaskFunction(message.name)
// Task message received
+ const fn = this.getTaskFunction(message.name)
if (fn?.constructor.name === 'AsyncFunction') {
this.runInAsyncScope(this.runAsync.bind(this), this, fn, message)
} else {