[Y-devel] Phil meet y-devel; y-devel meet Phil
Thomas spiralman at softhome.net
Thu Jul 22 06:41:06 BST 2004
On Wednesday 21 July 2004 06:38, Phil wrote:
> > One simple way to tell is to keep a client reference count for each
> > object, which would only keep track of how many clients hold references
> > to an object. When that count reaches zero (and you might have a server
> > flag which would keep this from being garbage collected), the resource
> > could be freed. This way, the GC would only need to be run each time a
> > client disconnects, reducing overhead.
>
> I am reasonably sure that for those objects which can be destroyed it
> will only be possible for one client to have a reference to that object
> anyway. Of course, it may be that that client has multiple references
> to the same thing, but I would imagine it will be cleaner to have the
> client end of things handle mapping multiple refernces onto a single
> server object.
>
> This removes a lot of complexity.
Actually, i was mucking around in this bit of code a while ago, and at the
time (and, as far as i know, even now) only one client was allowed access to
each object. However, this was causing some problems for some things I was
trying to implement (related to the desktop). Basically, more than one client
may need access to certain objects which need to be publicly available, the
desktop, for instance, and it was an unreasonable limitation, even at that
early stage of development, for each object to only be referenced by a single
client.
Mark mentioned changing this, and I even posted to the mailing list, saying I
was willing to work on it, and asking people for ideas on implementation, but
nobody responded and school work and other projects, not to mention lack of
feedback on some of my patches and semi-secretive modifications to some
integral parts of the code, took me away from my Y development.
Anyway, I certainly agree that each client should handle its own references
however it sees fit, but I also believe that multiple clients will need
access to the same object at the same time, and that my proposal could help
in that situation.
Thomas Stephens
spiralman at softhome.net
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved