|
From: | Michael Goffioul |
Subject: | Re: Passing variables up to the GUI |
Date: | Sat, 13 Apr 2013 19:49:57 -0400 |
Well, let's think about this. How is this going to crash from a too deep reference count? Would it be the case that if the worker thread (Octave core) keeps emitting signals while the GUI thread doesn't respond to them? Is that the bad scenario you are describing?
There is this option Qt::BlockingQueuedConnection that we could use. This runs the risk of, as you said, deadlocking the threads. But that might be fine in this case so long as there is no ->exec() in the GUI event loop. If the deadlocking is placed at moments where the GUI just accepts the data and stores it somewhere, builds a table, etc., I don't think that is too critical. If just the connections that are requesting octave_value_list data are BlockingQueued, then these are the GUI routines that are just wanting some data and not much else. I'm not sure using BlockingQueued is a good idea though in a complex system; not without some thought anyway. There is too much risk of some other programmer putting in an ->exec () into the code not realizing that is bad.
[Prev in Thread] | Current Thread | [Next in Thread] |