Hi Mirko, In kdegraphics/katalog I also have a thread class around. I'm a bit hesistant about promoting the use of threads though since debugging threads is a pain in the ass and Qt's implicit sharing of various objects (most notably QStrings) is a potential source of race-conditions. Cheers, Waldo On Sun, 24 Oct 1999, Mirko Sucker wrote: > Hello all, > > I uploaded the package kdethreads and the lsm to > upload.kde.org/pub/kde/Incoming. > Here is the lsm: > > Begin3 > Title: kdethreads > Version: prealpha > Entered-date: 241099 > Description: Multithreading classes K Desktop Environment (KDE) > Keywords: KDE X11 desktop Qt > Author: mirko@kde.org (Mirko Sucker) > Primary-site: ftp://ftp.kde.org/pub/kde > Alternate-site: > Platforms: Unix, Qt > Copying-policy: GPL > End > > The package contains a class to create threads. A test executable is included. > The package lacks the following: > > Currently, it is not possible to add one special event to the event loop in a > thread safe manner, as you cannot make sure that the event loop is not read > while you are adding something. > > If this could be incorporated, we would have excellent API threading support in > KDE. Every thread could inform the main thread at every time about its state. > So, if anyone knows how to implement the following steps, please send a reply: > ° Add event handlers for custom events (maybe virtual methods) that react on > thread notifications. > ° Trigger such a custom event from inside a thread by thread-safely appending it > to the event queue. > > This is all (really all) we need to create multi-threaded KDE applications, > since the user interface itselfes should stay single-threaded to avoid > hard-to-handle race conditions. > > Matthias, did you copy? > > Greetings, > --Mirko. > PS: Of course, this creates only the communication from the thread to the main > thread. To communicate the other way, the Thread object is used. See the > package... > -- > Denn der Mensch liebt und ehrt den Menschen, solange er ihn > nicht zu beurteilen vermag, und die Sehnsucht ist ein Erzeugnis > mangelhafter Erkenntnis. (Thomas Mann)