I could be wrong here, but we did something similar, setting proprieties like this. Although the code is re-entrant what you may see, if you have high enough traffic rates, is that depending on exactly what you are doing you may get Conflicting write exceptions. Additionally, you should be aware that each manage_changeProperties will be logged in your ZODB (look at the undo list) which means that your ZODB will grow. If you have high traffic rates it will grow at an unbelievable rate (ours did). The conflicting write scenario and the writing to the ZODB also means that you will suffer (maybe minor) performance degradation. Are you using a database? Dan David Kyte wrote:
Hi,
If I have a DTML document for generating and tracking say order numbers, is the code rentrant/Atomic?
<dtml-call "REQUEST.set('counter', counter + 1)"> <dtml-call "manage_changeProperties( counter=REQUEST['counter'] )"> <dtml-return counter >
What I'm really asking is how many threads run in parallel, and how would multiple threads accessing this code react.
Do I need some form of transation or locking?
Thanks in anticipation
David Kyte
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )