473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Proxying object memory for synchronous update.

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.

-------------------
ch***@mccormick.cx
http://mccormick.cx
Apr 2 '07 #1
0 921

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jim Campbell | last post by:
Suppose I wanted to a class to contain a pointer, but I didn't want to make the copy constructor or assignment operator reinitialize this pointer. (Think of a class that contains an mmapped pointer...
4
by: CroDude | last post by:
I've made a custom groupbox control. Inside, as one of it's members is CSimpleGradient object. CSimpleGradient is a wrapper class for gradient usage. Basically it looks like that: public class...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
5
by: HugeBob | last post by:
Hi All, I've got a question about Asynchronous vs Synchronous mode with the XMLHttpRequest object. What are the ramifications of using one mode vs the other? If the script uses Asynchronous...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.