...cont
This commit is contained in:
parent
6135618e24
commit
f1040a67b0
@ -59,9 +59,8 @@ namespace Aurora::Async
|
||||
|
||||
template<typename Info_t = AVoid, typename Result_t = AVoid, typename Task_t = FTask<Info_t, Result_t>, typename Job_t = FJob<Info_t, Result_t>, class a = const Job_t &, class b = Task_t &, class WorkerId_tt = WorkerId_t, AU_TEMPLATE_ENABLE_WHEN(std::is_same_v<WorkerId_tt, WorkerId_t>)>
|
||||
static AuSPtr<IWorkItem> NewWork(const WorkerId_tt &worker, a task, b job, bool enableWait = false)
|
||||
{
|
||||
auto baa = AuMakeShared<WorkPairImpl<Info_t, Result_t, Task_t>>(task, job);
|
||||
return NewWorkItem(worker, baa, enableWait);
|
||||
{
|
||||
return NewWorkItem(worker, AuMakeShared<WorkPairImpl<Info_t, Result_t, Task_t>>(task, job), enableWait);
|
||||
}
|
||||
|
||||
template<typename Info_t = AVoid, typename Result_t = AVoid, typename Task_t = FTask<Info_t, Result_t>, typename Job_t = FJob<Info_t, Result_t>, class a = const Job_t &, class b = Task_t &, class WorkerId_tt = WorkerId_t, AU_TEMPLATE_ENABLE_WHEN(std::is_same_v<WorkerId_tt, WorkerId_t>)>
|
||||
|
@ -577,11 +577,16 @@ namespace Aurora::Async
|
||||
{
|
||||
for (auto &[id, worker] : group->workers)
|
||||
{
|
||||
if (group->cvWorkMutex && group->cvVariable)
|
||||
{
|
||||
AU_LOCK_GUARD(group->cvWorkMutex);
|
||||
worker->shuttingdown = true;
|
||||
group->cvVariable->Broadcast();
|
||||
}
|
||||
else
|
||||
{
|
||||
worker->shuttingdown = true;
|
||||
}
|
||||
|
||||
if (groupId != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user