X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Fjavascript%2FyourWorker.js;h=cc462f7f97b1cde5a48712494a651fcf90f420fb;hb=3466e757691e2a07e2437d77167c78a0820c0431;hp=b2df8d19093527e0ca67a24f9f84589ab1207050;hpb=7a923e5bc16ae3524c51bedd70c65ce6cc556fdc;p=poolifier.git diff --git a/examples/javascript/yourWorker.js b/examples/javascript/yourWorker.js index b2df8d19..cc462f7f 100644 --- a/examples/javascript/yourWorker.js +++ b/examples/javascript/yourWorker.js @@ -1,5 +1,5 @@ 'use strict' -const { isMainThread } = require('worker_threads') +const { isMainThread } = require('node:worker_threads') const { ThreadWorker } = require('poolifier') const debug = false @@ -11,7 +11,7 @@ function yourFunction () { } JSON.stringify(o) } - debug === true && console.info('This is the main thread ' + isMainThread) + debug === true && console.info(`This is the main thread ${isMainThread}`) return { ok: 1 } }