Skip to content
Snippets Groups Projects
Commit 1721007e authored by Yoel's avatar Yoel
Browse files

Threadpool cleanup

parent a5b4bed4
No related branches found
No related tags found
No related merge requests found
......@@ -6,15 +6,12 @@ namespace util {
Threadpool::Threadpool(size_t n) : alive(true) {
// Create the specified number of threads
threads.reserve(n);
for (int i = 0; i < n; ++i) {
for (int i = 0; i < n; i++) {
threads.emplace_back(std::bind(&Threadpool::threading, this));
}
}
Threadpool::~Threadpool() {
// std::unique_lock<std::mutex> lock(m);
alive = false;
cv.notify_all();
......
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