Show More
@@ -48,6 +48,10 b' class BlockingSubSocketChannel(SubSocketChannel):' | |||
|
48 | 48 | |
|
49 | 49 | def get_msg(self, block=True, timeout=None): |
|
50 | 50 | """Get a message if there is one that is ready.""" |
|
51 | if block and timeout is None: | |
|
52 | # never use timeout=None, because get | |
|
53 | # becomes uninterruptible | |
|
54 | timeout = 1e6 | |
|
51 | 55 | return self._in_queue.get(block, timeout) |
|
52 | 56 | |
|
53 | 57 | def get_msgs(self): |
@@ -81,6 +85,10 b' class BlockingShellSocketChannel(ShellSocketChannel):' | |||
|
81 | 85 | |
|
82 | 86 | def get_msg(self, block=True, timeout=None): |
|
83 | 87 | """Get a message if there is one that is ready.""" |
|
88 | if block and timeout is None: | |
|
89 | # never use timeout=None, because get | |
|
90 | # becomes uninterruptible | |
|
91 | timeout = 1e6 | |
|
84 | 92 | return self._in_queue.get(block, timeout) |
|
85 | 93 | |
|
86 | 94 | def get_msgs(self): |
General Comments 0
You need to be logged in to leave comments.
Login now