[*] AuAsync invalid self itr upon nested poll
This commit is contained in:
parent
fe88ae9821
commit
342db487f9
@ -457,6 +457,10 @@ namespace Aurora::Async
|
||||
bool lowPrioCont {};
|
||||
bool lowPrioContCached {};
|
||||
|
||||
state->cookie++;
|
||||
|
||||
int start = state->cookie;
|
||||
|
||||
for (auto itr = state->pendingWorkItems.begin(); itr != state->pendingWorkItems.end(); )
|
||||
{
|
||||
if (state->threadObject->Exiting() || state->shuttingdown)
|
||||
@ -511,8 +515,15 @@ namespace Aurora::Async
|
||||
|
||||
// Atomically decrement global task counter
|
||||
runningTasks = this->tasksRunning_.fetch_sub(1) - 1;
|
||||
|
||||
if (start != state->cookie)
|
||||
{
|
||||
start = state->cookie;
|
||||
itr = state->pendingWorkItems.begin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gCurrentPool = oldTlsHandle;
|
||||
|
||||
// Return popped work back to the groups work pool when our -pump loops were preempted
|
||||
|
@ -45,5 +45,6 @@ namespace Aurora::Async
|
||||
AuSPtr<AsyncLoop> asyncLoop;
|
||||
Utility::RateLimiter rateLimiter;
|
||||
ERunMode runMode;
|
||||
int cookie {0};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user