Created
June 25, 2018 07:18
-
-
Save chnbohwr/bf7e12c0a2124cd14b8bddafaab7335d 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 { Worker } = require('worker_threads'); | |
| const path = require('path'); | |
| const worker1 = new Worker(path.resolve('./worker.js')); | |
| worker1.on('message', (message) => { | |
| console.log('main thread get message', message); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment