MCPcopy Create free account
hub / github.com/acl-dev/acl / peek

Method peek

lib_acl_cpp/independent/connpool/src/connect_manager.cpp:176–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174//////////////////////////////////////////////////////////////////////////
175
176connect_pool* connect_manager::peek()
177{
178 connect_pool* pool;
179 size_t service_size, n;
180
181 lock_->lock();
182 service_size = pools_.size();
183 if (service_size == 0)
184 {
185 lock_->unlock();
186 return NULL;
187 }
188 n = service_idx_ % service_size;
189 service_idx_++;
190 lock_->unlock();
191 pool = pools_[n];
192 return pool;
193}
194
195static unsigned hash(const void *buffer, size_t len)
196{

Callers

nothing calls this directly

Calls 5

hashFunction · 0.85
peekFunction · 0.50
lockMethod · 0.45
sizeMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected