Skip to content
Snippets Groups Projects
Commit 24b3b7e3 authored by vjpai's avatar vjpai
Browse files

Fix thread list iterator

parent 02b80549
No related branches found
No related tags found
No related merge requests found
......@@ -95,9 +95,8 @@ DynamicThreadPool::DynamicThreadPool(int reserve_threads) :
}
void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) {
for (auto t = tlist->begin(); t != tlist->end(); t++) {
delete *t;
t = tlist->erase(t);
for (auto t = tlist->begin(); t != tlist->end(); t = tlist->erase(t)) {
delete *t;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment