[*] win32 flag shouldn't be reset on recommit | regression since commit no longer starts from scratch under nt

This commit is contained in:
Reece Wilson 2022-04-01 19:33:11 +01:00
parent 8b72865586
commit fb5eb02594

View File

@ -125,7 +125,7 @@ namespace Aurora::Loop
{
auto count = queueIterator.itr->source->Singular() ? 1 : queueIterator.itr->source->GetHandles().size();
if (this->handleArrayOr_.size() <= 64)
if (this->handleArrayOr_.size() <= MAXIMUM_WAIT_OBJECTS)
{
AuRemoveRange(this->handleArrayOr_, queueIterator.startingIndexOr, count);
AuRemoveRange(this->handleArrayAnd_, queueIterator.startingIndexAnd, count);
@ -173,7 +173,7 @@ namespace Aurora::Loop
for (int i = 0; i < this->handleArrayAnd_.size(); i++)
{
if (((this->handleArrayOr_.size() % 64)) == 0)
if (((this->handleArrayOr_.size() % MAXIMUM_WAIT_OBJECTS)) == 0)
{
this->handleArrayOr_.push_back(this->hEvent_);
}
@ -190,21 +190,10 @@ namespace Aurora::Loop
for (const auto &re : this->removedSources_)
{
bShouldRebuild |= RemoveSourceNB(re);
bShouldRebuild |= this->RemoveSourceNB(re);
}
removedSources_.clear();
//if (this->sources_.empty() && this->removedSources_.size())
//{
// return true;
//}
// Reset relevant OS cache
this->bIsWinLoop_ = false;
this->bIsThreadSafe_ = false;
//AuTryClear(this->loopSourceExs_); // fuck we're losing shit
//AuTryClear(this->handleArray_);
this->removedSources_.clear();
// Reserve the cache arrays for initialization
this->loopSourceExs_.reserve(this->loopSourceExs_.size() + this->addedSources_.size());
@ -1081,7 +1070,7 @@ namespace Aurora::Loop
{
auto count = source.source->Singular() ? 1 : source.source->GetHandles().size();
if (this->handleArrayOr_.size() <= 64)
if (this->handleArrayOr_.size() <= MAXIMUM_WAIT_OBJECTS)
{
AuRemoveRange(this->handleArrayOr_, queueIterator.startingIndexOr, count);
AuRemoveRange(this->handleArrayAnd_, queueIterator.startingIndexAnd, count);