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

List:       kde-devel
Subject:    KDE & Multithreading
From:       Jay Cornwall <jay () evilrealms ! demon ! co ! uk>
Date:       2002-02-08 21:21:14
[Download RAW message or body]

Hi

I'm writing a multithreaded KDE application at the moment, which needs to be 
able to access the GUI (changing the status bar, lighting an LED, etc.) from 
different threads. The general impression I'm getting, from segfaults and 
from reading on the net, is that this isn't really feasible. QT's libqt-mt 
helps a little, but some things still can't be done without compiling KDE 
with multithreading suport (KDialog's, for example).

I used to write multithreaded apps for my old Amiga, using MUI (Magic User 
Interface), an OO GUI toolkit. This also didn't support accessing a GUI from 
multiple threads, but solved the problem by providing a method to "stack" GUI 
changes from any thread, which would be executed by the main thread shortly 
after.

However, KDE's use of QApplication::exec() seems quite restrictive, 
effectively blocking the main thread from doing anything along these lines. 
It makes me wonder how multithreaded KDE applications are implemented?

I agree that having all GUI accesses in one thread is a much better solution, 
but my program needs a separate thread for network access, or it slow the GUI 
to a crawl.

Any help would be appreciated. :)

Cheers,
Jay
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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