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