From 7f0e4941094accd876cd8d109cf601738584ce60 Mon Sep 17 00:00:00 2001 From: zhiyang7 Date: Tue, 14 Dec 2021 14:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=AE=88=E6=8A=A4=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- douzero/dmc/dmc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/douzero/dmc/dmc.py b/douzero/dmc/dmc.py index 37c65fd..f0808fa 100644 --- a/douzero/dmc/dmc.py +++ b/douzero/dmc/dmc.py @@ -172,7 +172,7 @@ def train(flags): actor = mp.Process( target=act, args=(i, device, batch_queues, models[device], flags)) - # actor.setDaemon(True) + actor.daemon = True actor.start() actor_processes.append(actor) @@ -209,6 +209,7 @@ def train(flags): for position in ['landlord', 'landlord_up', 'landlord_front', 'landlord_down', 'bidding']: thread = threading.Thread( target=batch_and_learn, name='batch-and-learn-%d' % i, args=(i,device,position,locks[device][position],position_locks[position])) + thread.setDaemon(True) thread.start() threads.append(thread)