Re: Plugin Unloading



On Thu, Sep 25, 2003 at 01:50:24PM -0700, Bob Smith wrote:
> 
> Yeah. I was thinking having say, an enabled unloaded plugin or a
> disabled unloading plugin. 

It should be noted that it would be possible have a plugin that is
disabled yet still loaded.  This would happen if a plugin can not
be unloaded, and would be a
    'do not load next time'
sort of state.

> > > Maybe we should have an Unloadable flag for glueins, or for plugins
> > > that can't be unloaded once loaded (gmodule can do this, right?). But,
> > > something unloadable can be hidden from the app by not being able to
> > > query for it, so we still can disable them.
> > 
> > The simple solution would be a virtual :
> >     GOService::unloadable_p
> > A plugin is unloadable if all of its services are.
> > 
> 
> Well, This might be good, but usually a plugin is unloadable as a whole.
> Some systems can dynamically load but then cant unload a .so file. I
> cant think of a specific instance of a service that cant be unloaded but
> a plugin can.

There are 3 layers of restriction that I can think of

1) The plugin loader can not unload things (eg your example of
   systems that do not support unloading)

2) The plugin itself is using resources that it can not shut down
   easily.

3) A service in the plugin is inuse or unable to shut down.

It seems relatively easy to handle all three.


> This is interesting. As I understand it, you would have to use a proxy
> object correct? Are you talking about reloading a plugin where the
> application doesn't know the plugin was ever removed?

There are two choices, proxies, or a registry of service users.
This would be handled at the application level.



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