Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
zodb
Commits
c7f68ff0
Commit
c7f68ff0
authored
Sep 11, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify undoLog() to allow other threads to run periodically.
parent
ef8e5a76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+11
-5
No files found.
src/ZODB/FileStorage.py
View file @
c7f68ff0
...
...
@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__
=
'$Revision: 1.
99
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
100
$'
[
11
:
-
2
]
import
base64
from
cPickle
import
Pickler
,
Unpickler
,
loads
...
...
@@ -1091,14 +1091,20 @@ class FileStorage(BaseStorage.BaseStorage,
us
=
UndoSearch
(
self
.
_file
,
self
.
_pos
,
self
.
_packt
,
first
,
last
,
filter
)
while
not
us
.
finished
():
us
.
search
()
# Hold lock for batches of 20 searches, so default search
# parameters will finish without letting another thread run.
for
i
in
range
(
20
):
if
us
.
finished
():
break
us
.
search
()
# Give another thread a chance, so that a long undoLog()
# operation doesn't block all other activity.
self
.
_lock_release
()
self
.
_lock_acquire
()
return
us
.
results
finally
:
self
.
_lock_release
()
def
undoFindNext
(
self
,
pos
,
result
,
first
,
i
,
filter
):
pass
def
transactionalUndo
(
self
,
transaction_id
,
transaction
):
"""Undo a transaction, given by transaction_id.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment