glyph,
> A "resource" - i.e. a Referenceable - is just a Python object in memory.
Indeed.
> but in normal operation, Python objects don't spontaneously ascend
> to a
different plane of existence - as long as there are pointers to them in
> memory
Of course.
> in the case of Referenceables that are currently in use, a
reference
> from a dictionary on the Broker instance for the client which
is using
> them
Suppose I have a Thingy:
myThingy = Thingy()
I want to give you some amount of access to manipulate myThingy, so I make a Referenceable which has some connection to it:
myReferenceable.thingy = weakref.proxy(myThingy)
and I send you the Referenceable. Now suppose I do
del myThingy
Now myThingy will be garbage collected. Then, if you invoke methods on myReferenceable, they'll fail. Is this what we want, or should I tell you that your RemoteReference should be considered stale?
If I'm not thinking about this correctly please advise. I realize that I could have done
myReferenceable.thingy = myThingy
so that myThingy lives as long as myReferenceable, but this doesn't actually seem like what I would normally want.
Daniel