Change slave_available() API

To return a pointer to the available
thread instead of a bool. This allows
to simplify the core loop in split().

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2013-02-06 09:36:13 +01:00
parent 88c3670edf
commit 14c2c1395b
3 changed files with 12 additions and 15 deletions

View File

@@ -149,7 +149,7 @@ struct ThreadPool : public std::vector<Thread*> {
MainThread* main_thread() { return static_cast<MainThread*>((*this)[0]); }
void read_uci_options();
bool slave_available(Thread* master) const;
Thread* available_slave(Thread* master) const;
void wait_for_think_finished();
void start_thinking(const Position&, const Search::LimitsType&,
const std::vector<Move>&, Search::StateStackPtr&);