MCPcopy Create free account
hub / github.com/defold/defold / ShutdownThread

Function ShutdownThread

engine/dlib/src/test/test_httpclient.cpp:727–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725};
726
727static void ShutdownThread(void *args)
728{
729 ShutdownThreadContext* ctx = (ShutdownThreadContext*)args;
730 while (!dmAtomicGet32(&ctx->m_GotIt))
731 {
732 // Now we give the test time to connect and be in-flight
733
734 if (dmHttpClient::GetNumPoolConnections() == 0)
735 {
736 dmTime::Sleep(1);
737 continue;
738 }
739
740 // There is a small gap between it is in use and it is connected
741 dmTime::Sleep(100);
742
743 if (dmHttpClient::ShutdownConnectionPool() > 0) {
744 dmAtomicStore32(&ctx->m_GotIt, 1);
745 } else {
746 break; // done.
747 }
748 }
749}
750
751static void ProxyHandshakeShutdownThread(void *args)
752{

Callers

nothing calls this directly

Calls 5

dmAtomicGet32Function · 0.85
GetNumPoolConnectionsFunction · 0.85
ShutdownConnectionPoolFunction · 0.85
dmAtomicStore32Function · 0.85
SleepFunction · 0.50

Tested by

no test coverage detected