Re: Keeping a factory around



Hi Gergo / Elliot,

On Mon, 15 Jan 2001, Elliot Lee wrote:
> On Mon, 15 Jan 2001, ERDI Gergo wrote:
> > Most factory processes exit after the last instance of the created
> > objects is destroyed. Is there a way to ``ref the factory''?

        Yes of course; if your program wants to exit after some timeout,  
that's just fine. The whole process is completely controlled by the
application.

> > I'm thinking about
> > such use cases of Bonobo-Media as the preview of music files in Nautilus:
> > this would load and unload the factory everytime a new preview is     
> > requested (i.e. every time the user rests the pointer above a music   
> > file's icon), which could cause a longer delay before the playback can
> > start.
  
        I don't think this is neccessary; the underlying OS should do a
good job of caching the executable and file data, and knows more about the
general pressure on the system resources. I would not encourage components
hanging about indefinately.

> I remember discussing it with Maciej - basically it would involve oafd
> ref()ing the factory and then unref()ing it after an activity timeout.
> This will require interface changes and will really have to be done in    
> oaf HEAD for GNOME 2.0.
  
        This is one way to do it. I don't see the advantage however,
perhaps it fixes some race condition I am not seeing or something.

        Either way in order to 'ref' the factory OAF would need to be tied
to Bonobo which it seems you are not a fan of by any means.

> Another solution that works now is just to create the new object 
> before destroying the old one.
  
        We already have a bonobo_idle_unref function, adding a
bonobo_timeout_unref function is extraordinarily trivial, the user can do
the work themselfs though; I don't really want to encourage this ATM. 
  
        Regards,
  
                Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]