[Tutor] Tracking variable changes in a different application
ALAN GAULD
alan.gauld at btinternet.com
Thu Sep 3 01:15:59 CEST 2009
Not in general. Variables change too quickly for that to be viable - think
>>about a loop counter in a while loop, it could change millions of times
>>>>per second!
>>
>>
>Could you not use an observer pattern here to do that?
>
>http://en.wikipedia.org/wiki/Observer_pattern
>
You could but the danger romains that if someone puts the
change inside a loop:
>
for n in range(10,000):
ChangeMyVariable()
>
You could wind up getting 10,000 change notifications within a second
and very few applications will respond nicely to that! Which makes it a
risky option and using a persistent queue such as a database table or
middleware queuing mechanism is far safer.
>
HTH,
>
Alan G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090902/fcd4ca95/attachment-0001.htm>
More information about the Tutor
mailing list