问题
I'm creating an app where I need to stop some code without doing all the buggy sleep forever methods, or creating an if statement in every function checking if the stop variable is true, so I decided to use worker_threads, but every time I use it, I get an error:
Error: The V8 platform used by this instance of Node does not support creating Workers
And I don't understand why. Is it because it's inside Electron, maybe?
Code:
const { Worker } = require("worker_threads");
const test = new Worker('./Test.js')
来源:https://stackoverflow.com/questions/57013013/nodejs-module-worker-threads-returning-error-error-the-v8-platform-used-by-t