mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-19 06:40:01 +00:00
reintroduce waiting for results
This commit is contained in:
@@ -45,7 +45,7 @@ void TLuaEngine::operator()() {
|
|||||||
beammp_lua_error("Calling \"onInit\" on \"" + Future->StateId + "\" failed: " + Future->ErrorMessage);
|
beammp_lua_error("Calling \"onInit\" on \"" + Future->StateId + "\" failed: " + Future->ErrorMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*std::queue<std::shared_ptr<TLuaResult>> ResultsToCheck;
|
std::queue<std::shared_ptr<TLuaResult>> ResultsToCheck;
|
||||||
std::recursive_mutex ResultsToCheckMutex;
|
std::recursive_mutex ResultsToCheckMutex;
|
||||||
std::thread ResultCheckThread([&] {
|
std::thread ResultCheckThread([&] {
|
||||||
while (!mShutdown) {
|
while (!mShutdown) {
|
||||||
@@ -71,7 +71,6 @@ void TLuaEngine::operator()() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
// event loop
|
// event loop
|
||||||
auto Before = std::chrono::high_resolution_clock::now();
|
auto Before = std::chrono::high_resolution_clock::now();
|
||||||
while (!mShutdown) {
|
while (!mShutdown) {
|
||||||
@@ -99,10 +98,10 @@ void TLuaEngine::operator()() {
|
|||||||
}
|
}
|
||||||
Before = std::chrono::high_resolution_clock::now();
|
Before = std::chrono::high_resolution_clock::now();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if (ResultCheckThread.joinable()) {
|
if (ResultCheckThread.joinable()) {
|
||||||
ResultCheckThread.join();
|
ResultCheckThread.join();
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t TLuaEngine::CalculateMemoryUsage() {
|
size_t TLuaEngine::CalculateMemoryUsage() {
|
||||||
|
|||||||
Reference in New Issue
Block a user