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

Function bthread_keytable_pool_init

src/bthread/key.cpp:441–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439extern "C" {
440
441int bthread_keytable_pool_init(bthread_keytable_pool_t* pool) {
442 if (pool == NULL) {
443 LOG(ERROR) << "Param[pool] is NULL";
444 return EINVAL;
445 }
446 pthread_rwlock_init(&pool->rwlock, NULL);
447 pool->list = new butil::ThreadLocal<bthread::KeyTableList>();
448 pool->free_keytables = NULL;
449 pool->size = 0;
450 pool->destroyed = 0;
451 return 0;
452}
453
454int bthread_keytable_pool_destroy(bthread_keytable_pool_t* pool) {
455 if (pool == NULL) {

Callers 2

TESTFunction · 0.85
StartInternalMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68