浏览代码

wip: un-daemon tesseractnetwork

justheuristic 5 年之前
父节点
当前提交
55c79d10c1
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      tesseract/network/__init__.py

+ 4 - 1
tesseract/network/__init__.py

@@ -34,7 +34,10 @@ class TesseractNetwork(mp.Process):
         self.ready.set()
 
         while True:
-            method, args, kwargs = self._pipe.recv()
+            try:
+                method, args, kwargs = self._pipe.recv()
+            except:
+                print('>>', self.pid, flush=True)
             getattr(self, method)(*args, **kwargs)
 
     def run_in_background(self, await_ready=True, timeout=None):