[*] caught async deinit deadlock
featues conflicting with idec what. this mess needs rewriting
This commit is contained in:
parent
cdad552ed0
commit
a60e740328
@ -1000,7 +1000,9 @@ namespace Aurora::Async
|
||||
{
|
||||
auto pWorkItem = DispatchOn({ this->SharedFromThis(), id }, [=]()
|
||||
{
|
||||
GetThreadState()->features.push_back(pFeature);
|
||||
auto pState = GetThreadState();
|
||||
AU_LOCK_GUARD(pState->featuresMutex);
|
||||
pState->features.push_back(pFeature);
|
||||
pFeature->Init();
|
||||
});
|
||||
|
||||
@ -1413,9 +1415,7 @@ namespace Aurora::Async
|
||||
|
||||
AuList<AuSPtr<AuThreads::IThreadFeature>> features;
|
||||
{
|
||||
AU_LOCK_GUARD(this->rwlock_->AsReadable()); // WARNING: this should be write, but im seeing a deadlock on exit
|
||||
// there is no real race condition to be concerned about
|
||||
// AsReadable shouldn't be enterable while someone is writing (the other accessor)
|
||||
AU_LOCK_GUARD(jobWorker->featuresMutex);
|
||||
features = AuExchange(jobWorker->features, {});
|
||||
}
|
||||
|
||||
@ -1476,7 +1476,10 @@ namespace Aurora::Async
|
||||
jobWorker->externalFences.clear();
|
||||
}
|
||||
|
||||
features = AuExchange(jobWorker->features, {});
|
||||
{
|
||||
AU_LOCK_GUARD(jobWorker->featuresMutex);
|
||||
features = AuExchange(jobWorker->features, {});
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -43,6 +43,7 @@ namespace Aurora::Async
|
||||
AuWPtr<GroupState> parent;
|
||||
AuThreadPrimitives::Semaphore syncSema;
|
||||
AuThreadPrimitives::Event isDeadEvent;
|
||||
AuMutex featuresMutex;
|
||||
AuList<AuSPtr<AuThreads::IThreadFeature>> features;
|
||||
bool rejecting {};
|
||||
bool exiting {};
|
||||
|
Loading…
Reference in New Issue
Block a user