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
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):
self
.
_call
=
self
.
_server
.
call
self
.
_async
=
self
.
_server
.
async
self
.
_async_iter
=
self
.
_server
.
async_iter
self
.
_wait
=
self
.
_server
.
wait
self
.
_commit_lock
=
threading
.
Lock
()
try
:
self
.
_server
.
start
(
wait
=
wait
)
except
Exception
:
# No point in keeping the server going of the storage creation fails
self
.
_server
.
close
()
raise
if
wait
:
try
:
self
.
_wait
()
except
Exception
:
# No point in keeping the server going of the storage
# creation fails
self
.
_server
.
close
()
raise
def
new_addr
(
self
,
addr
):
self
.
_addr
=
addr
...
...
src/ZEO/asyncio/client.py
View file @
b2b1d6e5
...
...
@@ -805,9 +805,10 @@ class ClientThread(ClientRunner):
loop
.
close
()
logger
.
debug
(
'Stopping client thread'
)
def
start
(
self
,
wait
=
True
):
if
wait
:
self
.
wait_for_result
(
self
.
client
.
connected
,
self
.
timeout
)
def
wait
(
self
,
timeout
=
None
):
if
timeout
is
None
:
timeout
=
self
.
timeout
self
.
wait_for_result
(
self
.
client
.
connected
,
timeout
)
closed
=
False
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