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

Function get_leaky_singleton

src/bthread/singleton_on_bthread_once.h:52–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50// but also on bthread with hanging operation.
51template <typename T>
52inline T* get_leaky_singleton() {
53 using LeakySingleton = GetLeakySingleton<T>;
54 bthread_once(LeakySingleton::g_create_leaky_singleton_once,
55 LeakySingleton::create_leaky_singleton);
56 return LeakySingleton::_instance;
57}
58
59} // namespace bthread
60

Callers

nothing calls this directly

Calls 1

bthread_onceFunction · 0.85

Tested by

no test coverage detected