add base class to start

master
bel 2023-03-25 21:50:51 -06:00
parent 96585d4787
commit f06c2eed8f
1 changed files with 14 additions and 0 deletions

View File

@ -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)