// init() is called at startup to create and launch requested threads, that will // go immediately to sleep. We cannot use a c'tor because Threads is a static // object and we need a fully initialized engine at this point due to allocation // of Endgames in Thread c'tor. public void init() { timer = new_timerthread(); Add(new_mainthread()); read_uci_options(); }
public static TimerThread new_timerthread() { TimerThread th = new TimerThread(); ThreadHelper.thread_create(out th.handle, ThreadPool.start_routine, th); return th; }