mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-18 14:40:54 +00:00
clarify thread names
This commit is contained in:
@@ -48,6 +48,7 @@ void TLuaEngine::operator()() {
|
||||
}
|
||||
|
||||
auto ResultCheckThread = std::thread([&] {
|
||||
RegisterThread("ResultCheckThread");
|
||||
while (!mShutdown) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
std::unique_lock Lock(mResultsToCheckMutex);
|
||||
|
||||
@@ -461,6 +461,7 @@ void TNetwork::ClientKick(TClient& c, const std::string& R) {
|
||||
}
|
||||
|
||||
void TNetwork::Looper(const std::weak_ptr<TClient>& c) {
|
||||
RegisterThreadAuto();
|
||||
while (!c.expired()) {
|
||||
auto Client = c.lock();
|
||||
if (Client->GetStatus() < 0) {
|
||||
@@ -707,9 +708,11 @@ void TNetwork::SendFile(TClient& c, const std::string& UnsafeName) {
|
||||
|
||||
std::thread SplitThreads[2] {
|
||||
std::thread([&] {
|
||||
RegisterThread("SplitLoad_0");
|
||||
SplitLoad(c, 0, MSize, false, FileName);
|
||||
}),
|
||||
std::thread([&] {
|
||||
RegisterThread("SplitLoad_1");
|
||||
SplitLoad(c, MSize, Size, true, FileName);
|
||||
})
|
||||
};
|
||||
|
||||
@@ -61,6 +61,7 @@ int main(int argc, char** argv) try {
|
||||
Application::Console().InitializeLuaConsole(LuaEngine);
|
||||
Application::CheckForUpdates();
|
||||
|
||||
RegisterThread("Main(Waiting)");
|
||||
while (!Shutdown) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user