X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fthread-worker.mjs;h=92508dd887c80e7f6c210d87dec673c0b8952ee3;hb=ae493d445b7f89bba8321d208bf0536e8a37a204;hp=7af5fa638aed36a25bba7c384d95c8b604eac5ba;hpb=aed302d456407817a368e3f743020474b60facd2;p=poolifier.git diff --git a/benchmarks/internal/thread-worker.mjs b/benchmarks/internal/thread-worker.mjs index 7af5fa63..92508dd8 100644 --- a/benchmarks/internal/thread-worker.mjs +++ b/benchmarks/internal/thread-worker.mjs @@ -1,15 +1,15 @@ import { isMainThread } from 'node:worker_threads' import { ThreadWorker } from '../../lib/index.mjs' -import { executeTaskFunction } from '../benchmarks-utils.mjs' -import { TaskFunctions } from '../benchmarks-types.mjs' - -const debug = false +import { executeTaskFunction } from '../benchmarks-utils.cjs' +import { TaskFunctions } from '../benchmarks-types.cjs' const taskFunction = data => { data = data || {} data.function = data.function || TaskFunctions.jsonIntegerSerialization + data.debug = data.debug || false const res = executeTaskFunction(data) - debug === true && console.debug(`This is the main thread ${isMainThread}`) + data.debug === true && + console.debug(`This is the main thread ${isMainThread}`) return res }