Closed zmitchell closed 3 years ago
preserve_context()
is mainly there to ensure you don't reuse the same action twice. I suggest using the process-specific API (https://eliot.readthedocs.io/en/stable/generating/threads.html#cross-process-tasks):
Does that make sense?
This makes sense. Something isn't quite working right, but I can't tell what at the moment because Qt gobbles up exceptions raised in slots. Thanks for your help, I'll let you know if I have more questions!
What are you working on, if I can ask?
I work in an ultrafast spectroscopy lab, and I’m writing a GUI application that controls the experiment (talks to hardware) and displays the data collected in real time.
On Feb 28, 2020, at 7:59 PM, Itamar Turner-Trauring notifications@github.com wrote:
What are you working on, if I can ask?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Neat. I've enjoyed working with scientists in the past (did some image processing work for spatial gene sequencing), if there's any other way I can help let me know. And do ask again if you can't figure out the solution.
Hi, I'm not sure if you know much about Qt, but I'm trying to use
eliot
to log from some "worker" threads that operate within a Qt application I've made. I see that there's theeliot.preserve_context
API, but I'm not quite sure how to use it in this context (no pun intended).So you have an idea of how this looks from the Qt side, you start by making a QObject subclass.
Then you instantiate one of these workers and call
moveToThread
:My log entries show up when I log to a file, but they are out of order and show up with
<unnamed>
in them:Do you have any suggestions?