Re: ref counting in Bonobo
- From: lacage email enst fr (Mathieu Lacage)
- To: gnome-components-list gnome org
- Subject: Re: ref counting in Bonobo
- Date: 30 Sep 1999 00:22:27 +0200
Svanberg Liss <lisss@ydab.se> writes:
> <quote>
> # Here's an example of an alternative mechanism you could support in this
> # way: Servers support an interface that's internal to Bonobo that allows
> # clients to register a ping interface with them. When the client obtains
> # the initial reference it registers a ping interface (this would have to be
> # handled by the mechanism that hands initial references to the client).
> # When the client's reference count reaches zero, it unregisters the ping
> # interface. On the server side, each time a client registers a ping
> # interface with the server, the server uses the object's Unknown interface
> # to increase the ref count on the object. It decreases the ref count
> # whenever a client unregisters the ping interface, or whenever the client
> # fails to respond to an actual ping attempt after a certain amount of time.
> # All of this server-side work should be wrapped in library routines as
> # well, so that it is transparent to the server implementation.
> <endquote>
>
> If I have understood it right, we have a
> interface Ping {
> void Foo ();
> };
>
> that all Gnome objects should implement, and that should be used as "ticket"
> when a "client" want's to connect to a "server".
> This way the server would be able to "ping" it's clients now and then, to
> see if they are alive.
> ( Or actually, the framework in bonobo )
If i am not wrong, i think that this feature is also implemented as the
gnome_object_ping function (once more, not sure about its name but there
was one around some time ago. It should be still there)
Basically, this function did a ref/unref to test whether the Object was
still there. However, there was a major pb with this: Objects which had
never been referenced before or something in the kind. This was some
VERY difficult pb (at least, it seemed so to me): Eliot talked about
some socket stuff... Perhaps this has been adressed since then.
I refer you to the list archives (my mail folder underwent some big
surgery recently)
Mathieu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]