mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 11:33:03 +01:00
Avoid redefining JobPool::AddTask
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user