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

List:       kfm-devel
Subject:    Re: some thoughts on libkio
From:       Dawit Alemayehu <adawit () earthlink ! net>
Date:       1999-12-07 13:37:19
[Download RAW message or body]

On Tue, 07 Dec 1999, Stephan Kulow wrote:
> Dawit Alemayehu wrote:
> > 
> 
> > > Well, as each app will start a slave when the file dialog uses libkio
> > > for everything, it's basicly a bad idea not to share them.
> > 
> > Right.  But even with the current design this is not a problem as the io-slaves
> > are shared with KIOSlavePool.
> > 
> which does only exist once per app, right? :)

Nope.  That would then not work with multiple instances of konqueror.  Someone
did a smart thing when creating KIOSlavePool and added a static member function
that points to the current instance:

static KIOSlavePool* self();

This is what what KIOJob uses to create io-slaves:

KIOSlave* KIOJob::createSlave( const char *_protocol, int& _error, QString& _error_text )
{
  KIOSlave *s = KIOSlavePool::self()->slave( _protocol );
  ...
}

Hence, the slaves are actually shared across apps even though each app creates
its own KIOJob.

Regards,
Dawit A.

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

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