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

List:       kde-core-devel
Subject:    Re: [PATCH] KIO::SlaveBase and the event loop
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-07-15 15:05:06
Message-ID: 200807151205.07193.thiago () kde ! org
[Download RAW message or body]


Roland Harnau wrote:
>2008/7/15, Thiago Macieira <thiago@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

["signature.asc" (application/pgp-signature)]

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

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