Cant use worker threads
See original GitHub issueTrying to run the following code using NW.js v0.43.0 returns “Error: The V8 platform used by this instance of Node does not support creating Workers”
const { Worker } = require('worker_threads');
const worker = new Worker('const { parentPort } = require("worker_threads");parentPort.once("message",message => parentPort.postMessage({ pong: message })); ', { eval: true });
worker.on('message', message => console.log(message));
worker.postMessage('ping');
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
node.js - Compilation error on worker thread in Typescript
worker.workerData is an arbitrary JavaScript value that contains a clone of the data passed to this thread's Worker constructor so it needs ...
Read more >Unable to use NodeJS worker_threads module #18540 - GitHub
A workaround may be passing signal to trigger things in main thread and return data back to the worker thread. You may use...
Read more >Using worker_threads in Node.js - Medium
This is a beginner's guide to using worker_threads in Node.js. It does not assume you already understand Web Workers. (The API for worker_threads...
Read more >How to work with worker threads in NodeJS
Why Can't Node Handle CPU Intensive Tasks? We call the single thread running in Node programs the event loop. Node uses it to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix is released in 0.44.0 beta1
Please check and post updates in #7114. This issue is the duplicate of it.