Clarify the behaviour of execute_with_worker[s]

This commit is contained in:
Tomasz Sobczyk
2020-10-20 10:50:59 +02:00
committed by nodchip
parent 74af287637
commit f2ad307de3
2 changed files with 11 additions and 3 deletions

View File

@@ -186,8 +186,7 @@ void ThreadPool::clear() {
main()->previousTimeReduction = 1.0;
}
void ThreadPool::execute_with_workers(std::function<void(Thread&)> worker)
void ThreadPool::execute_with_workers(const std::function<void(Thread&)>& worker)
{
for(Thread* th : *this)
{