X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fthread.cpp;h=f88e359b0373436db1f6c445f72f4b04448667e7;hb=ae5d2c38e1b9f6a990c29d31a37d6555d197f939;hp=5e990fdc680c0549a58f6412256d61ddf4642ac2;hpb=cf5d683408a2ef8a1c80be9bf7d6790a38b16277;p=stockfish diff --git a/src/thread.cpp b/src/thread.cpp index 5e990fdc..f88e359b 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -118,7 +118,7 @@ void Thread::idle_loop() { } /// ThreadPool::set() creates/destroys threads to match the requested number. -/// Created and launched threads will go immediately to sleep in idle_loop. +/// Created and launched threads will immediately go to sleep in idle_loop. /// Upon resizing, threads are recreated to allow for binding if necessary. void ThreadPool::set(size_t requested) { @@ -136,10 +136,10 @@ void ThreadPool::set(size_t requested) { while (size() < requested) push_back(new Thread(size())); clear(); - } - // Reallocate the hash with the new threadpool size - TT.resize(Options["Hash"]); + // Reallocate the hash with the new threadpool size + TT.resize(Options["Hash"]); + } } /// ThreadPool::clear() sets threadPool data to initial values.