Dolda2000 GitWeb
/
didex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved cursor functionality.
[didex.git]
/
didex
/
db.py
diff --git
a/didex/db.py
b/didex/db.py
index
7435166
..
33eb0d8
100644
(file)
--- a/
didex/db.py
+++ b/
didex/db.py
@@
-94,6
+94,15
@@
class txn(object):
def postcommit(self, fun):
self.pcommit.add(fun)
def postcommit(self, fun):
self.pcommit.add(fun)
+def dloopfun(fun):
+ def wrapper(self, *args, **kwargs):
+ while True:
+ try:
+ return fun(self, *args, **kwargs)
+ except deadlock:
+ continue
+ return wrapper
+
def txnfun(envfun):
def fxf(fun):
def wrapper(self, *args, tx=None, **kwargs):
def txnfun(envfun):
def fxf(fun):
def wrapper(self, *args, tx=None, **kwargs):