- for (int i = 0; i < MAX_THREADS; i++)
- if (i < activeThreads)
- {
- // Dynamically allocate pawn and material hash tables according to the
- // number of active threads. This avoids preallocating memory for all
- // possible threads if only few are used.
- threads[i].pawnTable.init();
- threads[i].materialTable.init();
- threads[i].maxPly = 0;
-
- threads[i].do_sleep = false;
-
- if (!useSleepingThreads)
- threads[i].wake_up();
- }
- else
- threads[i].do_sleep = true;