浏览代码

wip: un-daemon tesseractnetwork

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

+ 1 - 1
tesseract/network/__init__.py

@@ -15,7 +15,7 @@ class TesseractNetwork(mp.Process):
     HEARTBEAT_EXPIRATION = 120  # expert is inactive iff it fails to post timestamp for *this many seconds*
     HEARTBEAT_EXPIRATION = 120  # expert is inactive iff it fails to post timestamp for *this many seconds*
     make_key = "{}::{}".format
     make_key = "{}::{}".format
 
 
-    def __init__(self, *initial_peers: Tuple[str, int], port=8081, start=False, daemon=False):
+    def __init__(self, *initial_peers: Tuple[str, int], port=8081, start=False, daemon=True):
         super().__init__()
         super().__init__()
         self.port, self.initial_peers = port, initial_peers
         self.port, self.initial_peers = port, initial_peers
         self._pipe, self.pipe = mp.Pipe(duplex=False)
         self._pipe, self.pipe = mp.Pipe(duplex=False)