On Thu, 2013-01-24 at 15:35 +0100, Martin Sivak wrote:
This involves couple of places:
- TUI is blocking and waiting for user input
- Progress HUB is in charge and is reading the progress queue
- any other part wanting to react to a message like READY, ..
This patch directly fixes the first two and adds a mechanism to register callbacks that will react to the third one.
We (me and vpodzime) expect python-meh integration to use this to file exception reports from text mode installation.
Actually all this risen from the fact, that we need to get exception handling to the main thread. If an exception appears in a non-main thread, we cannot compete with the main thread for the standard input, we cannot use libreport that forks and execs and we cannot quit the installation neither by calling sys.exit() (because the main thread simply goes on) nor by sending SIGTERM to ourselves, because signals are not processed always (e.g. in blocking queue.pop() we use in the progress hub).
I have a patch for the aforementioned cases, it just needs some polishing.