namespace Stockfish {
-// Thread class keeps together all the thread-related stuff. We use
-// per-thread pawn and material hash tables so that once we get a
-// pointer to an entry its lifetime is unlimited and we don't have
-// to care about someone changing the entry under our feet.
-
+// Thread class keeps together all the thread-related stuff.
class Thread {
std::mutex mutex;
ButterflyHistory mainHistory;
CapturePieceToHistory captureHistory;
ContinuationHistory continuationHistory[2][2];
+ PawnHistory pawnHistory;
};
// MainThread is a derived class specific for main thread
-
struct MainThread: public Thread {
using Thread::Thread;
// ThreadPool struct handles all the threads-related stuff like init, starting,
// parking and, most importantly, launching a thread. All the access to threads
// is done through this class.
-
struct ThreadPool {
void start_thinking(Position&, StateListPtr&, const Search::LimitsType&, bool = false);