-// ThreadPool::read_uci_options() updates internal threads parameters from the
-// corresponding UCI options and creates/destroys threads to match the requested
-// number. Thread objects are dynamically allocated to avoid creating all possible
-// threads in advance (which include pawns and material tables), even if only a
-// few are to be used.
-
-void ThreadPool::read_uci_options() {
-
- size_t requested = Options["Threads"];
-
- assert(requested > 0);
-
- while (size() < requested)
- push_back(new_thread<Thread>());
-
- while (size() > requested)
- {
- delete_thread(back());
- pop_back();
- }
-}
-
+void ThreadPool::start_thinking(Position& pos, StateListPtr& states,
+ const Search::LimitsType& limits, bool ponderMode) {