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
nexedi
ZODB
Commits
78dd3098
Commit
78dd3098
authored
Feb 05, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make lock non-private so subclasses can use it with with.
parent
8721048e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/ZODB/BaseStorage.py
src/ZODB/BaseStorage.py
+5
-5
No files found.
src/ZODB/BaseStorage.py
View file @
78dd3098
...
...
@@ -83,12 +83,12 @@ class BaseStorage(UndoLogCompatible):
log
.
debug
(
"create storage %s"
,
self
.
__name__
)
# Allocate locks:
self
.
_
_
lock
=
threading
.
RLock
()
self
.
_lock
=
threading
.
RLock
()
self
.
__commit_lock
=
threading
.
Lock
()
# Comment out the following 4 lines to debug locking:
self
.
_lock_acquire
=
self
.
_
_
lock
.
acquire
self
.
_lock_release
=
self
.
_
_
lock
.
release
self
.
_lock_acquire
=
self
.
_lock
.
acquire
self
.
_lock_release
=
self
.
_lock
.
release
self
.
_commit_lock_acquire
=
self
.
__commit_lock
.
acquire
self
.
_commit_lock_release
=
self
.
__commit_lock
.
release
...
...
@@ -114,7 +114,7 @@ class BaseStorage(UndoLogCompatible):
f
=
sys
.
_getframe
(
1
)
sys
.
stdout
.
write
(
"[la(%s:%s)
\
n
"
%
(
f
.
f_code
.
co_filename
,
f
.
f_lineno
))
sys
.
stdout
.
flush
()
self
.
_
_
lock
.
acquire
(
*
args
)
self
.
_lock
.
acquire
(
*
args
)
sys
.
stdout
.
write
(
"la(%s:%s)]
\
n
"
%
(
f
.
f_code
.
co_filename
,
f
.
f_lineno
))
sys
.
stdout
.
flush
()
...
...
@@ -122,7 +122,7 @@ class BaseStorage(UndoLogCompatible):
f
=
sys
.
_getframe
(
1
)
sys
.
stdout
.
write
(
"[lr(%s:%s)
\
n
"
%
(
f
.
f_code
.
co_filename
,
f
.
f_lineno
))
sys
.
stdout
.
flush
()
self
.
_
_
lock
.
release
(
*
args
)
self
.
_lock
.
release
(
*
args
)
sys
.
stdout
.
write
(
"lr(%s:%s)]
\
n
"
%
(
f
.
f_code
.
co_filename
,
f
.
f_lineno
))
sys
.
stdout
.
flush
()
...
...
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