提交 02438ee6 编写于 作者: M Megvii Engine Team

refactor(mge/distributed): use thread.Threading to create Server

GitOrigin-RevId: fc994411bf775566284e9caada79d3dc40890b4b
上级 a1efd4d5
......@@ -6,7 +6,6 @@
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import multiprocessing as mp
import threading
import time
from collections import defaultdict
......@@ -142,7 +141,7 @@ class Server:
def __init__(self, port):
self.py_server_port = get_free_ports(1)[0] if port == 0 else port
self.mm_server_port = create_mm_server("0.0.0.0", 0)
self.proc = mp.Process(
self.proc = threading.Thread(
target=start_server,
args=(self.py_server_port, self.mm_server_port),
daemon=True,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册