Allow execution of tasks on the global thread pool.

This commit is contained in:
Tomasz Sobczyk
2020-10-17 23:26:29 +02:00
committed by nodchip
parent 146a6b056e
commit 5188c26b20
3 changed files with 37 additions and 2 deletions

View File

@@ -345,6 +345,12 @@ void UCI::loop(int argc, char* argv[]) {
// Command to call qsearch(),search() directly for testing
else if (token == "qsearch") qsearch_cmd(pos);
else if (token == "search") search_cmd(pos, is);
else if (token == "tasktest")
{
Threads.execute_parallel([](auto& th) {
std::cout << th.thread_idx() << '\n';
});
}
// test command
else if (token == "test") test_cmd(pos, is);