Created
June 25, 2018 09:00
-
-
Save chnbohwr/50174d51ba5d20fc104aaa601fbf82c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { parentPort } = require('worker_threads'); | |
const sha256 = require('sha256'); | |
parentPort.on('message', (count) => { | |
const shaArray = Array.from(Array(count)).map(() => sha256(Math.random().toString())) | |
parentPort.postMessage(shaArray); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment