repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: add missing killHandler worker options documentation
[poolifier.git]
/
benchmarks
/
internal
/
cluster-worker.mjs
diff --git
a/benchmarks/internal/cluster-worker.mjs
b/benchmarks/internal/cluster-worker.mjs
index 2ec78054e655f25f181e888c0f90b6bd28ba4b66..bc3548394616f1426f48dda0c8a4e9719937e15d 100644
(file)
--- a/
benchmarks/internal/cluster-worker.mjs
+++ b/
benchmarks/internal/cluster-worker.mjs
@@
-1,16
+1,16
@@
import { isMaster } from 'cluster'
import { ClusterWorker } from '../../lib/index.mjs'
import { isMaster } from 'cluster'
import { ClusterWorker } from '../../lib/index.mjs'
-import { execute
Worker
Function } from '../benchmarks-utils.mjs'
-import {
Worker
Functions } from '../benchmarks-types.mjs'
+import { execute
Task
Function } from '../benchmarks-utils.mjs'
+import {
Task
Functions } from '../benchmarks-types.mjs'
const debug = false
const debug = false
-
function workerFunction (data)
{
+
const taskFunction = (data) =>
{
data = data || {}
data = data || {}
- data.function = data.function ||
Worker
Functions.jsonIntegerSerialization
- const res = execute
Worker
Function(data)
+ data.function = data.function ||
Task
Functions.jsonIntegerSerialization
+ const res = execute
Task
Function(data)
debug === true && console.debug('This is the main thread ' + isMaster)
return res
}
debug === true && console.debug('This is the main thread ' + isMaster)
return res
}
-export default new ClusterWorker(
worker
Function)
+export default new ClusterWorker(
task
Function)