-template Value ThreadsManager::split<false>(Position&, SearchStack*, Value, Value, Value, Depth, Move, int, MovePicker*, int);
-template Value ThreadsManager::split<true>(Position&, SearchStack*, Value, Value, Value, Depth, Move, int, MovePicker*, int);
-
-
-// Thread::timer_loop() is where the timer thread waits maxPly milliseconds
-// and then calls do_timer_event().
-
-void Thread::timer_loop() {
-
- while (!do_terminate)
- {
- lock_grab(&sleepLock);
- timed_wait(&sleepCond, &sleepLock, maxPly ? maxPly : INT_MAX);
- lock_release(&sleepLock);
- do_timer_event();
- }
-}
-
-
-// ThreadsManager::set_timer() is used to set the timer to trigger after msec
-// milliseconds. If msec is 0 then timer is stopped.
-
-void ThreadsManager::set_timer(int msec) {
-
- Thread& timer = threads[MAX_THREADS + 1];
-
- lock_grab(&timer.sleepLock);
- timer.maxPly = msec;
- cond_signal(&timer.sleepCond); // Wake up and restart the timer
- lock_release(&timer.sleepLock);
-}
-
-
-// Thread::listener_loop() is where the listener thread, used for I/O, waits for
-// input. When is_searching is false then input is read in sync with main thread
-// (that blocks), otherwise the listener thread reads any input asynchronously
-// and processes the input line calling do_uci_async_cmd().
-
-void Thread::listener_loop() {
-
- std::string cmd;
-
- while (true)
- {
- lock_grab(&sleepLock);
-
- Threads.inputLine = cmd;
- do_sleep = !is_searching;
-
- // Here the thread is parked in sync mode after a line has been read
- while (do_sleep && !do_terminate) // Catches spurious wake ups
- {
- cond_signal(&Threads.sleepCond); // Wake up main thread
- cond_wait(&sleepCond, &sleepLock); // Sleep here
- }
-
- lock_release(&sleepLock);
-
- if (do_terminate)
- return;
+template Value ThreadPool::split<false>(Position&, Stack*, Value, Value, Value, Move*, Depth, Move, int, MovePicker&, int);
+template Value ThreadPool::split<true>(Position&, Stack*, Value, Value, Value, Move*, Depth, Move, int, MovePicker&, int);