[PATCH] KIO::SlaveBase and the event loop

Thiago Macieira thiago at kde.org
Tue Jul 15 16:05:06 BST 2008

Roland Harnau wrote:
>2008/7/15, Thiago Macieira <thiago at kde.org>:
>> Well, my plan was a bit more ambitious. I wanted all ioslaves to run
>> inside an event loop. The KIO::Connection would be used in in
>> readyRead() slot handlers instead of waitFor* style functions as it is
>> right now.
>> It was too much work for too little gain.
>Apropos ambitious plans: In the planning phase for KDE4 did you
>consider to re-implement the IO slaves as threads? The process
>creation cost including the D-Bus talk to klauncher seem quite high to
>me, especially if Konqueror launches 20 or more  of them.

No. We've wanted separate processes for ioslaves for the whole time, since 
this improves stability. IOSlaves are add-on plugins (yay for multiple 
redundant buzzwords meaning the same thing!) that can come from many 
different sources. We can't really vouch for the stability of them.

Besides, we can't know if the code in the ioslaves is using a 
non-reentrant function or not.

If we used threads, a badly behaving ioslave could crash Konqueror, 
KWrite, Kile, KWord, anything that uses KIO. Right now, it crashes on its 
own and its name is pointed out.

As a future improvement, the launcher could detect a crashing ioslave and 
disable it temporarily.

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080715/a8132f0e/attachment.sig>

More information about the kde-core-devel mailing list