<div dir="ltr"><div><div><div><div><div>Dear twisted users,<br><br></div>I think I have found some surprising behavior in perspective broker. I define a subclass of pb.RemoteCache which has a method managed by a descriptor. The descriptor keeps track of the instances it manages in a set.<br>
<br>When the RemoteCache is first received by the client, it accesses the descriptor-ified method inside setCopyableState. At that time the RemoteCache's id is a certain value X. Then later when the RemoteCache is notified of a change by the server side Cacheable, it again accesses the descriptor-ified method, but at this time it's id is Y, and Y!=X.<br>
<br></div>I attach to this post a simple working example which displays the behavior described above. To run, first run server.py and then run client.py. You will see a little bit of output, the most important part being<br>
<br>===<br>Client received RemoteCache: id=45952496<br></div><br></div><div>Asking server to update<br></div>TD 45921680 (test.RemoteCache.add) accessed by <test.RemoteCache instance at 2BD2DC8>: id=45952456<br></div>
RemoteCache id=45952496<div><div><div>===<br><br></div><div>To understand the details of the output please see descriptor.py. The id of the RemoteCache is first reported as 45952496 when the client receives it. Then, when the descriptor is accessed, the id of the accessing instance is reported as 45952456, which is different. Then, when in the last line we print out the id of the RemoteCache we're back to 45952496.<br>
<br></div><div>Is there some reason that a RemoteCache's id can change during its life time?<br clear="all"></div><div><div><div><div><div><br>-- <br>Daniel Sank<br>Department of Physics<br>Broida Hall<br>University of California<br>
Santa Barbara, CA 93117<br>(805)893-3899
</div></div></div></div></div></div></div></div>