Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mitogen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
mitogen
Commits
658806bd
Commit
658806bd
authored
Oct 23, 2017
by
David Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fakessh: interruptible wait compatible with <2.7; closes #55
parent
b3491b19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mitogen/fakessh.py
mitogen/fakessh.py
+6
-2
No files found.
mitogen/fakessh.py
View file @
658806bd
...
...
@@ -160,8 +160,12 @@ class Process(object):
self
.
router
.
broker
.
start_receive
(
self
.
pump
)
def
wait
(
self
):
while
not
self
.
wake_event
.
wait
(
0.1
):
pass
while
not
self
.
wake_event
.
isSet
():
# Timeout is used so that sleep is interruptible, as blocking
# variants of libc thread operations cannot be interrupted e.g. via
# KeyboardInterrupt. isSet() test and wait() are separate since in
# <2.7 wait() always returns None.
self
.
wake_event
.
wait
(
0.1
):
@
mitogen
.
core
.
takes_router
...
...
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