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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
fc36b9ec
Commit
fc36b9ec
authored
Jan 11, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added code to handle a possible race condition in
management of pool lock.
parent
04894d01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/ZODB/DB.py
src/ZODB/DB.py
+10
-2
No files found.
src/ZODB/DB.py
View file @
fc36b9ec
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
##############################################################################
##############################################################################
"""Database objects
"""Database objects
$Id: DB.py,v 1.
19 1999/11/23 22:55:54
jim Exp $"""
$Id: DB.py,v 1.
20 2000/01/11 19:30:53
jim Exp $"""
__version__
=
'$Revision: 1.
19
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
20
$'
[
11
:
-
2
]
import
cPickle
,
cStringIO
,
sys
,
POSException
,
UndoLogCompatible
import
cPickle
,
cStringIO
,
sys
,
POSException
,
UndoLogCompatible
from
Connection
import
Connection
from
Connection
import
Connection
...
@@ -469,6 +469,10 @@ class DB(UndoLogCompatible.UndoLogCompatible):
...
@@ -469,6 +469,10 @@ class DB(UndoLogCompatible.UndoLogCompatible):
self
.
_r
()
self
.
_r
()
pool_lock
.
acquire
()
pool_lock
.
acquire
()
self
.
_a
()
self
.
_a
()
if
len
(
pool
)
>
1
:
# Note that the pool size will normally be 1 here,
# but it could be higher due to a race condition.
pool_lock
.
release
()
else
:
return
else
:
return
elif
len
(
pool
)
==
1
:
elif
len
(
pool
)
==
1
:
...
@@ -480,6 +484,10 @@ class DB(UndoLogCompatible.UndoLogCompatible):
...
@@ -480,6 +484,10 @@ class DB(UndoLogCompatible.UndoLogCompatible):
self
.
_r
()
self
.
_r
()
pool_lock
.
acquire
()
pool_lock
.
acquire
()
self
.
_a
()
self
.
_a
()
if
len
(
pool
)
>
1
:
# Note that the pool size will normally be 1 here,
# but it could be higher due to a race condition.
pool_lock
.
release
()
c
=
pool
[
-
1
]
c
=
pool
[
-
1
]
del
pool
[
-
1
]
del
pool
[
-
1
]
...
...
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