mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-05 15:26:19 +00:00
fully implement lua
This commit is contained in:
committed by
Anonymous275
parent
459814a6ec
commit
4cda6e8bc3
@@ -1,18 +1,18 @@
|
||||
#include "Common.h"
|
||||
#include "TConsole.h"
|
||||
|
||||
std::unique_ptr<TConsole> Application::_Console = std::make_unique<TConsole>();
|
||||
std::unique_ptr<TConsole> Application::mConsole = std::make_unique<TConsole>();
|
||||
|
||||
void Application::RegisterShutdownHandler(const TShutdownHandler& Handler) {
|
||||
std::unique_lock Lock(_ShutdownHandlersMutex);
|
||||
std::unique_lock Lock(mShutdownHandlersMutex);
|
||||
if (Handler) {
|
||||
_ShutdownHandlers.push_back(Handler);
|
||||
mShutdownHandlers.push_back(Handler);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::GracefullyShutdown() {
|
||||
std::unique_lock Lock(_ShutdownHandlersMutex);
|
||||
for (auto& Handler : _ShutdownHandlers) {
|
||||
std::unique_lock Lock(mShutdownHandlersMutex);
|
||||
for (auto& Handler : mShutdownHandlers) {
|
||||
Handler();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user