Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
a051be33
Commit
a051be33
authored
Dec 26, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
See 1.37.12.9 and 1.37.12.10.
parent
e79b6d1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+13
-5
No files found.
src/ZODB/FileStorage.py
View file @
a051be33
...
...
@@ -184,7 +184,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__
=
'$Revision: 1.4
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
9
$'
[
11
:
-
2
]
import
struct
,
time
,
os
,
bpthread
,
string
,
base64
,
sys
from
struct
import
pack
,
unpack
...
...
@@ -697,7 +697,8 @@ class FileStorage(BaseStorage.BaseStorage):
return
serial
finally
:
self
.
_lock_release
()
finally
:
self
.
_lock_release
()
def
supportsUndo
(
self
):
return
1
def
supportsVersions
(
self
):
return
1
...
...
@@ -1001,6 +1002,8 @@ class FileStorage(BaseStorage.BaseStorage):
locked
=
0
_lock_acquire
=
self
.
_lock_acquire
_lock_release
=
self
.
_lock_release
_commit_lock_acquire
=
self
.
_commit_lock_acquire
_commit_lock_release
=
self
.
_commit_lock_release
index
,
vindex
,
tindex
,
tvindex
=
self
.
_newIndexes
()
name
=
self
.
__name__
file
=
open
(
name
,
'rb'
)
...
...
@@ -1108,6 +1111,7 @@ class FileStorage(BaseStorage.BaseStorage):
return
packing
=
0
_commit_lock_acquire
()
_lock_acquire
()
locked
=
1
self
.
_packt
=
None
# Prevent undo until we're done
...
...
@@ -1290,6 +1294,7 @@ class FileStorage(BaseStorage.BaseStorage):
if
locked
:
# temporarily release the lock to give other threads
# a chance to do some work!
_commit_lock_release
()
_lock_release
()
locked
=
0
...
...
@@ -1324,8 +1329,9 @@ class FileStorage(BaseStorage.BaseStorage):
if
not
packing
:
# We are in the copying phase. Lets update the
# pack time and release the lock so others can write.
# We are in the copying phase. We need to get the lock
# again to avoid someone writing data while we read it.
_commit_lock_acquire
()
_lock_acquire
()
locked
=
1
...
...
@@ -1358,7 +1364,9 @@ class FileStorage(BaseStorage.BaseStorage):
finally
:
if
locked
:
_lock_release
()
if
locked
:
_commit_lock_release
()
_lock_release
()
_lock_acquire
()
self
.
_packt
=
z64
...
...
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