Re: what does transaction.abort() refresh?
Jim Fulton <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAPDm-FiFO=_gcF8xy2kNsZn8KqqMzNOiJ1d=HPrFuMfCq3PTVA@mail.gmail.com> |
On Wed, Oct 5, 2016 at 4:21 PM, Boylan, Ross <[email protected]> wrote: > My mental model, perhaps from Gemstone, Gemstone! > is that if I do > x1 = conn.root.x > # stuff > # another thread changes what's in root.x > transaction.abort() > that x1 will now have the value of root.x from the other thread. Yes, assuming conn was using the threaded transaction manager, x1 is a persistent object and the other thread mutated it. > But when I do this, x1 seems to be unchanged; I have to go back through conn.root.x to get the new version of the object. Is conn.root.x a persistent object? Does the other thread reassign conn.root.x? Jim > > Is my revised understanding correct? > > Using ZODB 5, python 3.4. > > Thanks. > Ross Boylan > > -- > You received this message because you are subscribed to the Google Groups "zodb" group. > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Jim Fulton http://jimfulton.info -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.