[*] Clean up commands.cpp
This commit is contained in:
parent
86ea34c7b1
commit
0a03613a61
@ -173,12 +173,14 @@ namespace Aurora::Console::Commands
|
||||
|
||||
void PumpCommands()
|
||||
{
|
||||
gMutex->Lock();
|
||||
|
||||
gPendingCommandsMutex->Lock();
|
||||
auto commands = AuExchange(gPendingCommands, {});
|
||||
gPendingCommandsMutex->Unlock();
|
||||
AU_LOCK_GUARD(gMutex);
|
||||
AuList<CommandDispatch> commands;
|
||||
|
||||
{
|
||||
AU_LOCK_GUARD(gPendingCommandsMutex);
|
||||
commands = AuExchange(gPendingCommands, {});
|
||||
}
|
||||
|
||||
if ((gCommandDispatcher.pool == nullptr) ||
|
||||
((gCommandDispatcher.pool.get() == Async::GetAsyncApp()) &&
|
||||
(gCommandDispatcher == Async::WorkerId_t{})))
|
||||
@ -194,7 +196,5 @@ namespace Aurora::Console::Commands
|
||||
DispatchCommandsFromThis(commands);
|
||||
}), true)->Dispatch()->BlockUntilComplete();
|
||||
}
|
||||
|
||||
gMutex->Unlock();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user