MCPcopy Create free account
hub / github.com/apache/brpc / ~CountersWrapper

Method ~CountersWrapper

test/bthread_key_unittest.cpp:71–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69struct CountersWrapper {
70 CountersWrapper(Counters* c, bthread_key_t key) : _c(c), _key(key) {}
71 ~CountersWrapper() {
72 if (_c) {
73 _c->ndestroy.fetch_add(1, butil::memory_order_relaxed);
74 }
75 CHECK_EQ(0, bthread_key_delete(_key));
76 }
77private:
78 Counters* _c;
79 bthread_key_t _key;

Callers

nothing calls this directly

Calls 2

bthread_key_deleteFunction · 0.85
fetch_addMethod · 0.80

Tested by

no test coverage detected