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

Function THreadKeyCreateAndDeleteFunc

test/thread_key_unittest.cpp:114–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void* THreadKeyCreateAndDeleteFunc(void*) {
115 while (!g_stopped) {
116 ThreadKey key;
117 EXPECT_EQ(0, butil::thread_key_create(key, NULL));
118 EXPECT_TRUE(!KEY_UNUSED(key._seq));
119 EXPECT_EQ(0, butil::thread_key_delete(key));
120 }
121 return NULL;
122}
123
124TEST(ThreadLocalTest, thread_key_create_and_delete) {
125 LOG(INFO) << "numeric_limits<uint32_t>::max()=" << std::numeric_limits<uint32_t>::max();

Callers

nothing calls this directly

Calls 2

thread_key_createFunction · 0.85
thread_key_deleteFunction · 0.85

Tested by

no test coverage detected