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

List:       kde-devel
Subject:    Re: KDE and IO
From:       Bavo De Ridder <bavo () ace ! ulyssis ! student ! kuleuven ! ac ! be>
Date:       1998-11-29 22:38:54
[Download RAW message or body]

On Sun, 29 Nov 1998, Sven Radej wrote:

> On Sun, 29 Nov 1998, Bavo De Ridder wrote:
> (...)
> >I am thinking of writing some kind of IOReactor framework the KDE apps could
> >use for better responsivenes (spelling errors????). Anyone has some comments on
> >the one?? The IOReactor would be local to the program, so not system-wide io
> >slaves. Then you would have a thread running the IOReactor and another the x
> >eventloop. The problem is off course the increased complexity of the libraries,
> >programs, ... and the thread-safety of the used XLib. How thread save is the
> >KDE by the way, anyone any ideas on that one?
> 
> KDE cannot be threaded, because Qt isn't threadable (at least not yet). For
> information how to implement threads in Qt, look for thechnical faq (or
> something like that) on htttp://www.troll.no.  It would be good to see
> threads in KDE.
> 

Qt has some reactor patterns as well: QSocketNotifier. It may seem that a
notifier for files is not necesssary, but think about loading large files
(or loading from NFS or SMB).

The main problem will be this: how to get messages coming from the IO
handling thread into the Qt thread. SO suppose I have some blocking IO
going on. Whenever the IO progresses, I want to inform the user of this
progress. So I would want to sent an updatemessage to some widget...

We could use a messagequeue (would be very interesting for KOffice and KDE
networked applications), but this shifts the problem to the messagequeue
thread. What I want to say: we would like *every* message targeted at the
Qt thread to come through the event loop.

I have some experience with multithreading so I wouldn't mind working on a
threadsafe way of incorporating the proposed changes into the KDE.


BDR

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

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