Ver Fonte

wip: un-daemon tesseractnetwork

justheuristic há 5 anos atrás
pai
commit
55c79d10c1
1 ficheiros alterados com 4 adições e 1 exclusões
  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):