mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-20 15:27:00 +00:00
fully implement lua
This commit is contained in:
1 parent
459814a6ec
commit
4cda6e8bc3
12 files changed
+252
-234
No files matched your search
+5
-5
@@ -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