改为守护线程模式
This commit is contained in:
parent
8939272955
commit
7f0e494109
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue