repositories
/
poolifier.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
717f3338a0ec9fd6208861e65aab769c66a29858
[poolifier.git]
/
workerThreadsWorker.js
1
const
{
isMainThread
,
parentPort
} =
require
(
'worker_threads'
)
2
3
if
(!
isMainThread
) {
4
for
(
let
i
=
0
;
i
<=
1000
;
i
++) {
5
const
o
= {
6
a
:
i
7
}
8
JSON
.
stringify
(
o
)
9
}
10
// console.log('This is the main thread ' + isMainThread)
11
parentPort
.
postMessage
({
ok
:
1
})
12
}