-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FATAL ERROR: HandleScope::HandleScope Entering the V8 API without proper locking in place #334
Comments
Hey @ashishchandr70, thanks for reporting! What version of node.js and threads.js are you running? |
Hi @andywer Thanks for getting back on a Sunday! Node: v12.20.0 |
I get the same error node 14.15.4
node 12.18.2
|
Looks to me as if the native code in your Forcing the use of tiny-worker instead of worker threads might solve it, but unfortunately #290 is not merged yet… |
I tried a proof of concept with worker_threads directly and got the same error, so tiny may be the route to go. Is there any way to force tiny to be used, like somehow making the worker_threads module not resolve ? |
Would be pretty hacky, but making the import from worker_threads throw would probably work if tiny-worker is installed. |
I had a go ad trying to alias the module with babel, didn't get it working in the end. I'll just wait for that PR to land thanks Cameron |
Closing this as all associated PRs have been addressed. |
Hi,
I am using threads.js for a multi-player game. The main thread spawns two separate workers who each execute the same function.
The two worker threads go ahead and do what they need to do and I await a websocket message to resolve a promise which indicates that the processing is complete.
However, when I call Thread.terminate, I immediately get the following error:
Here is my code from the master (main thread):
Everything works normally and I get the console.log for the winner. However, the moment it tries to execute
await Thread.terminate(playerThread1);
I get the V8 API error.The text was updated successfully, but these errors were encountered: