On Fri, May 13, 2005 at 06:10:54PM +0200, Lars Gullik Bjønnes wrote: > Martin Vermeer <[EMAIL PROTECTED]> writes: > > | On Fri, May 13, 2005 at 05:37:18PM +0200, Lars Gullik Bjønnes wrote: > > > | ... > | Yet I have a dark fear that somewhere in that 25 ms a > | processEvents-handled keystroke may slip in, and land on the wrong > | place. Having this happen only very rarely (but sometimes) is in a way > | even worse, more treacherous than having it all the time up-front. > > ??? > > Those events received while the timer goes (tick) is put on the queue.
Lars, Now that I have had some time to think it over, I am more and more inclined to suspect that there is something to my dark fear. As I understand it, LyX, Qt and X all process events in a "linear" fashion. This means, that routines call subroutines (stacking their context), calling subroutines, etc... until they return and unwind their contexts. The event loop (X or Qt) is no different. Under such a scheme it is _in principle impossible_ for function calls in different places in the code to pre-empt each other. The keystroke reversal we saw just cannot come about. So, _something_ is happening non-linearly, through pre-emption. We know of course that this kind of thing is happening on the system level all the time (hardware clock interrupt etc., process/thread switching). But this is irrelevant for our problem. It would be surprising if the same happened inside LyX. However... looking at my Makefile, I see QT_CPPFLAGS = -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR QT_INCLUDES = -I/usr/lib/qt-3.3/include QT_LDFLAGS = -L/usr/lib/qt-3.3/lib QT_LIB = -lqt-mt QT_VERSION = 3.3.3 qt-mt, doesn't that mean Qt multi-threading? Or am I holding the wrong end of the stick? Regards, Martin
pgphtMFkziyQX.pgp
Description: PGP signature