Currently, the multi-threaded Qt4 version of ipython is implemented such that
the GUI thread is constantly polling (every 100 ms) for new commands. While this
is working well, it is not really nice style.
In Qt4 there is a nice way of doing dispatching, by making use of Qt4 signals, which can be sent between task. I propose to implement Qt4 multithreading as follows:
Every time the user wants a command to be executed, a signal is sent to the GUI thread demanding it to execute the command, afterwards waiting until this is done.
Such an implementation has the side advantage that it only uses Qt4 multithreading
and as such has less compatibility issues if used in a Qt4 environment.
I added an example implementation. Remark: pyqt4 recently had issues with inter-thread signals, but those have been solved in the newest versions.