|
@@ -21,16 +21,17 @@ class TokenStream(object):
|
|
|
def get_line(self, timeout):
|
|
def get_line(self, timeout):
|
|
|
return self.get_token(timeout)
|
|
return self.get_token(timeout)
|
|
|
|
|
|
|
|
-def launch_input_sources(interrupted):
|
|
|
|
|
|
|
+def launch_input_sources():
|
|
|
global _TOKEN_STREAM
|
|
global _TOKEN_STREAM
|
|
|
_TOKEN_STREAM = TokenStream()
|
|
_TOKEN_STREAM = TokenStream()
|
|
|
|
|
|
|
|
services = [
|
|
services = [
|
|
|
- console_input.ConsoleInput(_TOKEN_STREAM, interrupted)
|
|
|
|
|
|
|
+ console_input.ConsoleInput(_TOKEN_STREAM)
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
for s in services:
|
|
for s in services:
|
|
|
t = threading.Thread(target=s.run)
|
|
t = threading.Thread(target=s.run)
|
|
|
|
|
+ t.setDaemon(True)
|
|
|
t.start()
|
|
t.start()
|
|
|
|
|
|
|
|
def get_token(timeout=120, preferred_phrases=None):
|
|
def get_token(timeout=120, preferred_phrases=None):
|