MCPcopy Create free account
hub / github.com/catboost/catboost / GetImpl

Method GetImpl

library/cpp/coroutine/engine/sockpool.h:197–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195
196private:
197 TPooledSocket::TImpl* GetImpl() {
198 TGuard<TMutex> guard(Mutex_);
199
200 while (!Pool_.Empty()) {
201 THolder<TPooledSocket::TImpl> ret(Pool_.PopFront());
202
203 if (ret->IsOpen()) {
204 return ret.Release();
205 }
206 }
207 return nullptr;
208 }
209
210 void Release(TPooledSocket::TImpl* impl) noexcept {
211 TGuard<TMutex> guard(Mutex_);

Callers 7

AsyncAcceptMethod · 0.45
TWorkMethod · 0.45
~TWorkMethod · 0.45
~TDeadlineTimerMethod · 0.45
AsyncWaitExpireAtMethod · 0.45
TTcpSocketMethod · 0.45
TTcpAcceptorMethod · 0.45

Calls 4

EmptyMethod · 0.45
PopFrontMethod · 0.45
IsOpenMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected