[ZODB-Dev] Checking transaction status?

Christian Robottom Reis kiko@async.com.br
Tue, 10 Jul 2001 16:12:21 -0300 (BRT)


On Tue, 10 Jul 2001, Jim Fulton wrote:

> This answered the question he asked, but not the question he meant to ask.
> Christian meant to ask: "Is there an easy way to check if
> a transaction has been started and has pending modifications?".

It's hard to deal with people that are at least 7 times more intelligent
than yourself. *sigh* (Discussing things in Portuguese and getting it into
English quick for an email makes my thoughtline broken.  :-)

> There ought to be an interface on transactions to find out
> of they have pending changes, but there isn't. You can look
> at their '_objects' attribute to see if it is non-empty.
> Of course, this might be broken in some future version, but if
> we do break it, we'll at least provide an API to do the right
> thing.

Thanks. For now, it's a decent fix. I now thought that since I'm only
modifying one type of object, I could also use the _p_changed attribute to
see if it's dirty.

I'm at the point where having separate transaction scopes would start to
be really nice. Is there a project to implement parallel transactions,
where you could have one transaction running for one set of changes, and
another for another set of changes?

I think (know?) this can be done with threads, but my app is really
single-threaded right now, and I don't want to have to think about that
right now.

Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311