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

Method GetPool

engine/dlib/src/dlib/http_client.cpp:76–86  ·  view source on GitHub ↗

Create the pool lazily for two reasons 1. If dlib is imported from loaded from python it will crash and burn in OpenSSL as the we several symbol conflics, e.g. RSA_free, and the version from OpenSSL will be used instead of axTLS! 2. Startup performance. Minor in this context

Source from the content-addressed store, hash-verified

74 // the version from OpenSSL will be used instead of axTLS!
75 // 2. Startup performance. Minor in this context
76 dmConnectionPool::HPool GetPool()
77 {
78 DM_MUTEX_SCOPED_LOCK(m_Mutex);
79 if (m_Pool == 0) {
80 dmConnectionPool::Params params;
81 params.m_MaxConnections = MAX_POOL_CONNECTIONS;
82 dmConnectionPool::Result r = dmConnectionPool::New(&params, &m_Pool);
83 assert(r == dmConnectionPool::RESULT_OK);
84 }
85 return m_Pool;
86 }
87
88 dmConnectionPool::HPool GetPoolNoCreate()
89 {

Callers 3

ConnectMethod · 0.80
ReopenConnectionPoolFunction · 0.80
GetNumPoolConnectionsFunction · 0.80

Calls 2

NewFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected