mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-03 06:16:04 +00:00
add lua engine, lua file, server, client, vehicle data, other stuff
This commit is contained in:
committed by
Anonymous275
parent
e5e447c7af
commit
459814a6ec
18
src/Common.cpp
Normal file
18
src/Common.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "Common.h"
|
||||
#include "TConsole.h"
|
||||
|
||||
std::unique_ptr<TConsole> Application::_Console = std::make_unique<TConsole>();
|
||||
|
||||
void Application::RegisterShutdownHandler(const TShutdownHandler& Handler) {
|
||||
std::unique_lock Lock(_ShutdownHandlersMutex);
|
||||
if (Handler) {
|
||||
_ShutdownHandlers.push_back(Handler);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::GracefullyShutdown() {
|
||||
std::unique_lock Lock(_ShutdownHandlersMutex);
|
||||
for (auto& Handler : _ShutdownHandlers) {
|
||||
Handler();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user