[*] only pump this on dtor

This commit is contained in:
Reece Wilson 2022-02-21 21:19:12 +00:00
parent 01254d088b
commit bb6025ab5f

View File

@ -216,9 +216,7 @@ namespace Aurora::Logging
}
}
void ForceFlushFlushNoLock()
{
for (const auto &logger : gFlushableLoggers)
static void ForceFlushLogger(Logger *logger)
{
for (const auto &sink : logger->sinks)
{
@ -237,6 +235,13 @@ namespace Aurora::Logging
}
}
}
void ForceFlushFlushNoLock()
{
for (const auto &logger : gFlushableLoggers)
{
ForceFlushLogger(logger);
}
}
void ForceFlushFlush()
@ -251,7 +256,7 @@ namespace Aurora::Logging
AU_LOCK_GUARD(gGlobalSpin);
ForceFlushLoggersNoLock();
ForceFlushFlushNoLock();
ForceFlushLogger(this);
{
AU_LOCK_GUARD(spin);