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

Function ~KeyTableList

src/bthread/key.cpp:228–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 _head(NULL), _tail(NULL), _length(0) {}
227
228 ~KeyTableList() {
229 TaskGroup* g = BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_task_group);
230 KeyTable* old_kt = tls_bls.keytable;
231 KeyTable* keytable = _head;
232 while (keytable) {
233 KeyTable* kt = keytable;
234 keytable = kt->next;
235 tls_bls.keytable = kt;
236 if (g) {
237 g->current_task()->local_storage.keytable = kt;
238 }
239 delete kt;
240 if (old_kt == kt) {
241 old_kt = NULL;
242 }
243 g = BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_task_group);
244 }
245 tls_bls.keytable = old_kt;
246 if (g) {
247 g->current_task()->local_storage.keytable = old_kt;
248 }
249 }
250
251 void append(KeyTable* keytable) {
252 if (keytable == NULL) {

Callers

nothing calls this directly

Calls 1

current_taskMethod · 0.80

Tested by

no test coverage detected