Created
June 25, 2018 08:17
-
-
Save chnbohwr/38cde14fdf728322541785e59f9af924 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'); | |
parentPort.on('message', (message) => { | |
console.log(`worker get message: ${message}`); | |
parentPort.postMessage('got it!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment