]> git.seodisparate.com - EntityComponentMetaSystem/commitdiff
Remove zero-ing of atomic_uint in ThreadPool
authorStephen Seo <seo.disparate@gmail.com>
Thu, 16 Jun 2022 03:41:08 +0000 (12:41 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 16 Jun 2022 03:41:08 +0000 (12:41 +0900)
Setting the current "stacks" atomic_uint to zero is unnecessary once all
the threads have finished execution.

src/EC/ThreadPool.hpp

index b85c69859e6cb8a93ba6a1702160d98235ae3249..c57095a832216d09ba4b3f1acad84f051fd606d9 100644 (file)
@@ -125,9 +125,6 @@ class ThreadPool {
                                     }
                                     std::get<0>(threadStack->back())->detach();
                                     threadStack->pop_back();
-                                    if (threadStack->empty()) {
-                                        initCount->store(0);
-                                    }
                                     break;
                                 }
                             }