mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #9912 from s0r00t/refactor/jobpool-avoid-redefine
Avoid redefining JobPool::AddTask
This commit is contained in:
commit
9897572f55
|
@ -70,18 +70,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void AddTask(std::function<void()> workFn, std::function<void()> completionFn)
|
||||
void AddTask(std::function<void()> workFn, std::function<void()> completionFn = nullptr)
|
||||
{
|
||||
unique_lock lock(_mutex);
|
||||
_pending.emplace_back(workFn, completionFn);
|
||||
_condPending.notify_one();
|
||||
}
|
||||
|
||||
void AddTask(std::function<void()> workFn)
|
||||
{
|
||||
return AddTask(workFn, nullptr);
|
||||
}
|
||||
|
||||
void Join(std::function<void()> reportFn = nullptr)
|
||||
{
|
||||
unique_lock lock(_mutex);
|
||||
|
|
Loading…
Reference in New Issue