Minor fix in loop range that guarantees no Segfaults could happen.

This commit is contained in:
Samer Afach 2017-06-08 07:49:32 +02:00
parent 6952cf9372
commit 78c349e8f3

View File

@ -67,7 +67,7 @@ void ThreadPool::thread_worker() {
}
void ThreadPool::join_all() {
for (long i = 0; i < numOfThreads; i++) {
for (long i = 0; i < static_cast<long>(_threads.size()); i++) {
if (_threads[i].joinable())
_threads[i].join();
}