| 75 | uint16_t m_AllowNewConnections:1; |
| 76 | |
| 77 | ConnectionPool(const Params* params) |
| 78 | { |
| 79 | uint32_t max_connections = params->m_MaxConnections; |
| 80 | m_MaxKeepAlive = params->m_MaxKeepAlive; |
| 81 | m_Mutex = dmMutex::New(); |
| 82 | |
| 83 | m_Connections.SetCapacity(max_connections); |
| 84 | m_Connections.SetSize(max_connections); |
| 85 | |
| 86 | for (uint32_t i = 0; i < max_connections; ++i) { |
| 87 | m_Connections[i].Clear(); |
| 88 | } |
| 89 | |
| 90 | m_NextVersion = 0; |
| 91 | |
| 92 | // This is to block new connections when shutting down the pool. |
| 93 | m_AllowNewConnections = 1; |
| 94 | } |
| 95 | |
| 96 | ~ConnectionPool() |
| 97 | { |
nothing calls this directly
no test coverage detected