-class ThreadsManager {
- /* As long as the single ThreadsManager object is defined as a global we don't
- need to explicitly initialize to zero its data members because variables with
- static storage duration are automatically set to zero before enter main()
- */
-public:
- void init(); // No c'tor becuase Threads is static and we need engine initialized
- ~ThreadsManager();
-
- Thread& operator[](int id) { return *threads[id]; }
- bool use_sleeping_threads() const { return useSleepingThreads; }
- int min_split_depth() const { return minimumSplitDepth; }
- int size() const { return (int)threads.size(); }
-
- void wake_up() const;
- void sleep() const;
- void read_uci_options();
- bool available_slave_exists(int master) const;
- void set_timer(int msec);
- void wait_for_search_finished();
- void start_searching(const Position& pos, const Search::LimitsType& limits,
- const std::set<Move>& = std::set<Move>());