[*] Bug fixes

This commit is contained in:
Reece Wilson 2023-10-07 20:04:47 +01:00
parent f585d41ba3
commit 5c29787f9c
2 changed files with 32 additions and 6 deletions

View File

@ -47,16 +47,24 @@ namespace Aurora::Time
out.tm_year = year - 1900;
}
if (wday == 6) // ^1
if (wday)
{
out.tm_wday = 0;
auto cur = wday.value();
if (cur == 6) // ^1
{
out.tm_wday = 0;
}
else
{
out.tm_wday = cur + 1;
}
}
else
{
out.tm_wday = wday.value() + 1;
out.tm_wday = -1;
}
out.tm_yday = yday.value();
out.tm_yday = yday.value_or(-1);
if (!isdst.HasValue())
{

View File

@ -574,6 +574,9 @@ namespace Aurora::Threading::Threads
auto pFlag = this->pFlag;
auto pA = this->terminatedSignalLs_;
auto pB = this->terminated_;
try
{
if (auto task = task_)
@ -591,10 +594,18 @@ namespace Aurora::Threading::Threads
AU_LOCK_GUARD(pFlag->mutex);
if (pFlag->bLock)
{
this->SignalDeath();
if (pA)
{
pA->Set();
}
if (pB)
{
pB->Set();
}
return;
}
this->SignalDeath();
Exit(true);
#else
#if defined(AURORA_COMPILER_GCC)
@ -626,7 +637,14 @@ namespace Aurora::Threading::Threads
AU_LOCK_GUARD(pFlag->mutex);
if (pFlag->bLock)
{
this->SignalDeath();
if (pA)
{
pA->Set();
}
if (pB)
{
pB->Set();
}
return;
}