From 50b2d98d0aadd5eb92bd118e1b635779dbba9714 Mon Sep 17 00:00:00 2001 From: Dong Yan Date: Thu, 8 Feb 2018 21:17:56 +0800 Subject: [PATCH] support ctrl-c to terminate play.py --- AlphaGo/play.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AlphaGo/play.py b/AlphaGo/play.py index 1066624..38ae264 100644 --- a/AlphaGo/play.py +++ b/AlphaGo/play.py @@ -119,7 +119,10 @@ if __name__ == '__main__': thread_list.append(thread_play) for t in thread_list: + t.daemon = True t.start() - for t in thread_list: - t.join() + while True: + time.sleep(1) + #for t in thread_list: + # t.join()