-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Qt Thread data exchanging broken #7268
Comments
True. |
After quite a bit of rubber ducking, gdb stepping and source code reading: Passing of complex large objects works by registering a creator function and the type. I suspect one would want to use a type wrapping a refcounting data holder. Then again, doing multi-thread-safe refcounting requires barriers that might be more expensive than just copying say a 16k element FFT window or similar. |
The problem
Why did that not occur to us before?
The approach
The getter sub-problem
Recommended Solution
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
We have a problem with getting events into QThreads; essentially, it seems that we can't just exchange data from non-QThread threads into QThreads. What does happen when we do this frequently enough is that we corrupt, probably the stack, enough for malloc tables to get hit. ouch!
I've been trying to slightly read up on the topic, but a lot of info on data exchange into QThreads seems outdated (Qt3-era); some seems wrong. The issue seems to be that Qt's object life time control falls flat if you EMIT a signal from a non-QThread. I can't believe it's impossible to get data into Qt, so this warrants further consideration.
Right now, however, I'm stumped how to do data exchange correctly; the classical "you've been doing it wrong" articles
are not conclusive on that (as far as I can tell). However, what is sure is that we can't just call arbitrary Qt setters from the context of the main (python) thread (or something like the xmlrpc server thread).
I suspect the answer here is work-intense:
System Information
n/a
GNU Radio Version
3.11-git (main)
Specific Version
No response
Steps to Reproduce the Problem
see #6766 (as linked above)
Generally, hammering a qtgui sink's set_something function from a Python thread seems to do the job.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: