Use API identical to std classes where possible
This commit is contained in:
1 parent
87957e74c1
commit
44d16b32fe
32 files changed
+72
-87
No files matched your search
+4
-4
@@ -46,15 +46,15 @@ public:
|
||||
|
||||
void run()
|
||||
{
|
||||
boost::thread_group grupa;
|
||||
std::vector<boost::thread> group;
|
||||
for(size_t i=0; i<threads; i++)
|
||||
{
|
||||
std::shared_ptr<Payload> payload = context.at(i);
|
||||
|
||||
grupa.create_thread(std::bind(&ThreadPool::processTasks, this, payload));
|
||||
group.emplace_back(std::bind(&ThreadPool::processTasks, this, payload));
|
||||
}
|
||||
|
||||
grupa.join_all();
|
||||
for (auto & thread : group)
|
||||
thread.join();
|
||||
|
||||
//thread group deletes threads, do not free manually
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user