add base class to start
parent
96585d4787
commit
f06c2eed8f
|
|
@ -24,6 +24,20 @@ def main():
|
|||
def log(*args):
|
||||
print(">", *args, file=sys.stderr)
|
||||
|
||||
class Piper(threading.Thread):
|
||||
def __init__(self, inq, outq):
|
||||
threading.Thread.__init__(self)
|
||||
self.inq = inq
|
||||
self.outq = outq
|
||||
|
||||
def run(self):
|
||||
while True:
|
||||
got = self.inq.get()
|
||||
if got is None:
|
||||
break
|
||||
self._run(got)
|
||||
self.outq.put(None)
|
||||
|
||||
class Manager(threading.Thread):
|
||||
def __init__(self, outq):
|
||||
threading.Thread.__init__(self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue