MCPcopy Create free account
hub / github.com/apache/brpc / bthread_keytable_pool_getstat

Function bthread_keytable_pool_getstat

src/bthread/key.cpp:493–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493int bthread_keytable_pool_getstat(bthread_keytable_pool_t* pool,
494 bthread_keytable_pool_stat_t* stat) {
495 if (pool == NULL || stat == NULL) {
496 LOG(ERROR) << "Param[pool] or Param[stat] is NULL";
497 return EINVAL;
498 }
499 pthread_rwlock_wrlock(&pool->rwlock);
500 stat->nfree = pool->size;
501 pthread_rwlock_unlock(&pool->rwlock);
502 return 0;
503}
504
505int get_thread_local_keytable_list_length(bthread_keytable_pool_t* pool) {
506 if (pool == NULL) {

Callers 2

Calls

no outgoing calls

Tested by 1