You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var Worker = require('webworker-threads').Worker;
var worker = new Worker('worker.js');
worker.onmessage = function (event) {
console.log(event.data);
};
worker.postMessage('John');
Greetings!
I'm running the my code:
main.js:
worker.js:
but the code does not work.
What am I doing wrong?
Thanks in advance for help!
The text was updated successfully, but these errors were encountered: