repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update npmpublish.yml
[poolifier.git]
/
src
/
worker
/
abstract-worker.ts
diff --git
a/src/worker/abstract-worker.ts
b/src/worker/abstract-worker.ts
index 4a6241a8ccfdb1c7426504568989c3c293983405..8dcaa4c4d4d9e5553cb2398921d49ec33f2eed9f 100644
(file)
--- a/
src/worker/abstract-worker.ts
+++ b/
src/worker/abstract-worker.ts
@@
-43,7
+43,7
@@
export abstract class AbstractWorker<
type: string,
isMain: boolean,
fn: (data: Data) => Response,
type: string,
isMain: boolean,
fn: (data: Data) => Response,
- protected mainWorker
?
: MainWorker | null,
+ protected mainWorker: MainWorker | null,
public readonly opts: WorkerOptions = {
/**
* The kill behavior option on this Worker or its default value.
public readonly opts: WorkerOptions = {
/**
* The kill behavior option on this Worker or its default value.
@@
-163,7
+163,7
@@
export abstract class AbstractWorker<
const res = fn(value.data)
this.sendToMainWorker({ data: res, id: value.id })
} catch (e) {
const res = fn(value.data)
this.sendToMainWorker({ data: res, id: value.id })
} catch (e) {
- const err = this.handleError(e)
+ const err = this.handleError(e
as Error
)
this.sendToMainWorker({ error: err, id: value.id })
} finally {
this.lastTaskTimestamp = Date.now()
this.sendToMainWorker({ error: err, id: value.id })
} finally {
this.lastTaskTimestamp = Date.now()