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
b2b1d6e5
Commit
b2b1d6e5
authored
May 26, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
saneify ClientStorage/asyncio wait api
parent
ae4d9496
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+9
-6
src/ZEO/asyncio/client.py
src/ZEO/asyncio/client.py
+4
-3
No files found.
src/ZEO/ClientStorage.py
View file @
b2b1d6e5
...
@@ -266,15 +266,18 @@ class ClientStorage(object):
...
@@ -266,15 +266,18 @@ class ClientStorage(object):
self
.
_call
=
self
.
_server
.
call
self
.
_call
=
self
.
_server
.
call
self
.
_async
=
self
.
_server
.
async
self
.
_async
=
self
.
_server
.
async
self
.
_async_iter
=
self
.
_server
.
async_iter
self
.
_async_iter
=
self
.
_server
.
async_iter
self
.
_wait
=
self
.
_server
.
wait
self
.
_commit_lock
=
threading
.
Lock
()
self
.
_commit_lock
=
threading
.
Lock
()
try
:
if
wait
:
self
.
_server
.
start
(
wait
=
wait
)
try
:
except
Exception
:
self
.
_wait
()
# No point in keeping the server going of the storage creation fails
except
Exception
:
self
.
_server
.
close
()
# No point in keeping the server going of the storage
raise
# creation fails
self
.
_server
.
close
()
raise
def
new_addr
(
self
,
addr
):
def
new_addr
(
self
,
addr
):
self
.
_addr
=
addr
self
.
_addr
=
addr
...
...
src/ZEO/asyncio/client.py
View file @
b2b1d6e5
...
@@ -805,9 +805,10 @@ class ClientThread(ClientRunner):
...
@@ -805,9 +805,10 @@ class ClientThread(ClientRunner):
loop
.
close
()
loop
.
close
()
logger
.
debug
(
'Stopping client thread'
)
logger
.
debug
(
'Stopping client thread'
)
def
start
(
self
,
wait
=
True
):
def
wait
(
self
,
timeout
=
None
):
if
wait
:
if
timeout
is
None
:
self
.
wait_for_result
(
self
.
client
.
connected
,
self
.
timeout
)
timeout
=
self
.
timeout
self
.
wait_for_result
(
self
.
client
.
connected
,
timeout
)
closed
=
False
closed
=
False
def
close
(
self
):
def
close
(
self
):
...
...
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