-
Notifications
You must be signed in to change notification settings - Fork 45
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Cannot run in multiple worker theads #54
Comments
I know why you didn't see this before, it's tricky to reproduce. I was trying to put together a simple test case and found it didn't happen all time, where as on our production pipeline it fails immediately. Then I realized it depends on what elements you use, how many instances, what you interact with on the pipeline, etc, but it will fail eventually at some point if you are using multiple instances across threads. Here is the simplest test case I could produce that DOES fail, but you may have to run it a few times. To run:
// index.js
// worker.js
The full error on my machine is:
|
Note that you can create as many instances as you want within a SINGLE thread, and it will work fine. This only happens when you have instances in different threads. |
@Bahlinc-Dev node-gstreamer-superficial should be context-aware since #50 was closed- but i can't really test. do you have a suggestion what to do about this (or ideally a PR)? (i have little time to dig into this at all these days). |
I also am having this issue when using workers using the latest version. |
Is this package context aware?
It does run in node worker threads, but only a single thread.
I have an appsink in my pipeline, if I run 2 or more threads it will segfault during init:
Thread 1:
pipeline.findChild('sink')
Result: OK
Thread 2:
pipeline.findChild('sink')
Result: FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope
The text was updated successfully, but these errors were encountered: