MCPcopy Create free account
hub / github.com/Tencent/phxqueue / GetInstance

Method GetInstance

phxqueue/plugin/breakpointfactory.cpp:30–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28BreakPointFactoryCreateFunc BreakPointFactory::break_point_factory_create_func_ = nullptr;
29
30BreakPointFactory *BreakPointFactory::GetInstance() {
31 static BreakPointFactory *bpf = nullptr;
32
33 if (!bpf) {
34 if (break_point_factory_create_func_) bpf = break_point_factory_create_func_().release();
35 else bpf = new BreakPointFactory();
36 }
37
38 assert(bpf);
39 return bpf;
40}
41
42unique_ptr<comm::ConsumerBP> BreakPointFactory::NewConsumerBP() {
43 return unique_ptr<comm::ConsumerBP>(new comm::ConsumerBP());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected