[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Multithreading in KDE
From:       Mirko Sucker <mirko.sucker () unibw-hamburg ! de>
Date:       1999-10-24 17:26:09
[Download RAW message or body]

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)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic