-
Notifications
You must be signed in to change notification settings - Fork 225
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
Unable to use the module in 2 threads (worker_threads) #411
Comments
Sorry, fibers isn't compatible with worker_threads. I took a look into what would be required to get this working and it's definitely possible but it would take a lot of rewriting. |
@betandbuzz @laverdet I'm also looking forward this functionality. I have made a little rough attempt to get it working by using |
The main issue is statics/globals, yes. Some of these need to be defined per-thread, many need to be defined per-isolate, and some others should remain global but with locking. I suspect libcoro may also have issues with thread safety. |
wow, sounds like loads of fun. I'll give it a try.... |
Hi,
I'm trying to use
fibers
withworker_threads
:If I use
fibers
in both the main thread and the worker, I get the following error (it does not occur if I use fibers in a single context):Is it a bug or is it a
fiber
limitation that allows its use in only one thread?I'm using v10.8.0.
Thx!
The text was updated successfully, but these errors were encountered: