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)