-/// ThreadPool::init() creates and launches requested threads that will go
-/// immediately to sleep. We cannot use a constructor because Threads is a
-/// static object and we need a fully initialized engine at this point due to
-/// allocation of Endgames in the Thread constructor.
-
-void ThreadPool::init() {
-
- push_back(new MainThread);
- read_uci_options();
-}
-
-
-/// ThreadPool::exit() terminates threads before the program exits. Cannot be
-/// done in destructor because threads must be terminated before deleting any
-/// static objects while still in main().
-
-void ThreadPool::exit() {
-
- while (size())
- delete back(), pop_back();
-}