Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Proxying object memory for synchronous update.

Reply
Thread Tools

Proxying object memory for synchronous update.

 
 
Chris McCormick
Guest
Posts: n/a
 
      04-02-2007
Hi,

I'm looking for a solution to a concurrency problem I have. I would like
to have multiple objects with an Update() method. This Update method
might access the contents of other objects. I would like there to be a
proxy so that if object A's Update method is run before object B, and
object A modifies a few of it's own variables, arrays, whatever, then
when object B's Update is run and it tries to read object A's variables,
arrays or whatever, it gets the old values as if A's Update method had
not yet run. Once all of the update methods have been run on each object
(in an array), the actual values of each object's variables, arrays,
etc will be updated (possibly using another method). I'd like this to
be automatic so that i can just add a Mixin to a class to give it this
property, or a decorator or something.

I am thinking this might be possible to do using __getattr__ and
copy.copy() or pickle or something, but so far the solutions I have
tried don't work very well. they especially don't work if in the
situation where A has an array and it modifies an element of that
array (how would I proxy that access?).

Links, solutions, tutorials, whatever are very welcome.

Please reply to me off (and on) list as I am not subscribed.

Thank you very much for your help.

Best regards,

Chris.

-------------------

http://mccormick.cx
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between synchronous (proactor pattern) and synchronous model in web server Rickert C++ 0 10-06-2011 04:54 AM
HTML proxying in ASP.NET? Jeff Dege ASP .Net 3 10-05-2007 07:40 PM
transparent proxying to all except 1 bandage Cisco 2 01-27-2006 02:33 PM
Proxying the call to a JNI method Richard B. Christ Java 1 08-04-2004 11:52 PM
Pointer proxying with reference members Jim Campbell C++ 2 10-22-2003 01:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57