From 15217212421ba16596b8d30018056e341f5a3b96 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Sun, 4 Apr 2010 23:06:03 +0200 Subject: [PATCH] Distributed engine: always sleep in the slave to avoid busy loop. --- uct/slave.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uct/slave.c b/uct/slave.c index 81a149a..862968a 100644 --- a/uct/slave.c +++ b/uct/slave.c @@ -217,9 +217,10 @@ uct_genmoves(struct engine *e, struct board *b, struct time_info *ti, enum stone /* This is the first genmoves issue, start the MCTS. */ memset(&s, 0, sizeof(s)); uct_search_start(u, b, color, u->t, ti, &s); - /* ...wait a bit to populate the statistics minimally. */ - time_sleep(TREE_BUSYWAIT_INTERVAL); } + /* Wait a bit to populate the statistics + * and avoid a busy loop with the master. */ + time_sleep(TREE_BUSYWAIT_INTERVAL); /* Check the state of the Monte Carlo Tree Search. */ -- 2.11.4.GIT