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

Method VarMapWithLock

src/bvar/variable.cpp:78–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 pthread_mutex_t mutex;
77
78 VarMapWithLock() {
79 if (init(1024) != 0) {
80 LOG(WARNING) << "Fail to init VarMap";
81 }
82
83 pthread_mutexattr_t attr;
84 pthread_mutexattr_init(&attr);
85 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
86 pthread_mutex_init(&mutex, &attr);
87 pthread_mutexattr_destroy(&attr);
88 }
89};
90
91// We have to initialize global map on need because bvar is possibly used

Callers

nothing calls this directly

Calls 1

pthread_mutex_initFunction · 0.85

Tested by

no test coverage detected