Commit | Line | Data |
---|---|---|
57df5469 | 1 | 'use strict' |
be0676b3 | 2 | const { ThreadWorker } = require('../../../lib/index') |
bdacc2d2 | 3 | const { jsonIntegerSerialization } = require('../benchmark-utils') |
57df5469 | 4 | |
106744f7 | 5 | function yourFunction (data) { |
bdacc2d2 | 6 | jsonIntegerSerialization(1000) |
106744f7 | 7 | // console.log('This is the main thread ' + isMainThread) |
8 | return { ok: 1 } | |
9 | } | |
10 | ||
1f9a5a44 | 11 | module.exports = new ThreadWorker(yourFunction) |