Minor fix in loop range that guarantees no Segfaults could happen.
This commit is contained in:
parent
6952cf9372
commit
78c349e8f3
@ -67,7 +67,7 @@ void ThreadPool::thread_worker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ThreadPool::join_all() {
|
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())
|
if (_threads[i].joinable())
|
||||||
_threads[i].join();
|
_threads[i].join();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user