repositories
/
poolifier.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
build: bump volta node version
[poolifier.git]
/
examples
/
javascript
/
yourWorker.cjs
1
'use strict'
2
const { ThreadWorker } = require('poolifier')
3
4
function yourFunction () {
5
for (let i = 0; i <= 1000; i++) {
6
const o = {
7
a: i
8
}
9
JSON.stringify(o)
10
}
11
return { ok: 1 }
12
}
13
14
module.exports = new ThreadWorker(yourFunction)