+ // Wake up all the slave threads at once. This is faster than "wake and wait"
+ // for each thread and avoids a rare crash once every 10K games under Linux.
+ for (int i = 1; i < MAX_THREADS; i++)
+ {
+ threads[i].do_terminate = true;
+ threads[i].wake_up();
+ }
+