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

List:       kde-devel
Subject:    Re: When are multiple kioslave processes launched?
From:       Thiago Macieira <thiago () kde ! org>
Date:       2008-04-08 15:10:45
Message-ID: 200804081710.45266.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday 08 April 2008 16:12:01 Alex deVries wrote:
> > KIO opens a connection whenever an application attempts to access a
> > resource that is remote and there are no available (idling)
> > ioslaves. The
> > ioslave is considered free when it has been doing nothing for a
> > minute or
> > so (I don't remember the exact timeout).
>
> How is it determined if a kioslave is idle?

The ioslave is created by klauncher and told to connect to an application. It 
also receives an extra Unix socket path that is a connection to klauncher 
itself.

The application is responsible for telling the ioslave for disconnecting from 
it and returning to the pool. That's how the handover from Konqueror works 
too, albeit in a special case.

I don't know the exact internals. You can look into it in 
kdelibs/kio/kio/slavebase.cpp (slave side) and kdelibs/kio/kio/scheduler.cpp 
(application side). In particular, you may find interesting the 
SchedulerPrivate::slotCleanIdleSlaves() function.

// Slaves may be idle for MAX_SLAVE_IDLE time before they are being returned
// to the system wide slave pool. (3 minutes)
#define MAX_SLAVE_IDLE (3*60)

> Unfortunately, for AFP reopening connections can be slow on some NAS
> devices, so that isn't practical.  There are some tricks to resuming a
> connection, but these aren't necessarily portable to all AFP servers.
> I think I'll make a daemon that maintains the connection, and make a
> kioslave that can be stateless.
>
> I'm doing this on KDE 3.  Does the situation change at all in KDE 4?

No, it's exactly the same. In fact, I am looking at KDE 4 code.

-- 
  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)]

>> 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