From kde-core-devel Tue Jul 15 15:05:06 2008 From: Thiago Macieira Date: Tue, 15 Jul 2008 15:05:06 +0000 To: kde-core-devel Subject: Re: [PATCH] KIO::SlaveBase and the event loop Message-Id: <200807151205.07193.thiago () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=121613434913302 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1687374.UWsQmjeZFd" --nextPart1687374.UWsQmjeZFd Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Roland Harnau wrote: >2008/7/15, Thiago Macieira : >> 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= =20 this improves stability. IOSlaves are add-on plugins (yay for multiple=20 redundant buzzwords meaning the same thing!) that can come from many=20 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=20 non-reentrant function or not. If we used threads, a badly behaving ioslave could crash Konqueror,=20 KWrite, Kile, KWord, anything that uses KIO. Right now, it crashes on its=20 own and its name is pointed out. As a future improvement, the launcher could detect a crashing ioslave and=20 disable it temporarily. =2D-=20 =A0 Thiago Macieira =A0- =A0thiago (AT) macieira.info - thiago (AT) kde.org =A0 =A0 PGP/GPG: 0x6EF45358; fingerprint: =A0 =A0 E067 918B B660 DBD1 105C =A0966C 33F5 F005 6EF4 5358 --nextPart1687374.UWsQmjeZFd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBIfLyjM/XwBW70U1gRAgrEAJ46waL5AuQkLKTNt1HnciIcqQxHAwCeJltg 6cShYK3ZsVAYxzcpFzdXKcY= =JWrx -----END PGP SIGNATURE----- --nextPart1687374.UWsQmjeZFd--