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

Method GetThreadInstance

phxqueue/comm/breakpoint.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23ConsumerBP *ConsumerBP::GetThreadInstance() {
24 static thread_local ConsumerBP *bp{nullptr};
25 if (!bp) {
26 bp = plugin::BreakPointFactory::GetInstance()->NewConsumerBP().release();
27 }
28 if (!bp) {
29 bp = new ConsumerBP();
30 }
31 assert(bp);
32
33 return bp;
34}
35
36ConsumerConsumeBP *ConsumerConsumeBP::GetThreadInstance() {
37 static thread_local ConsumerConsumeBP *bp{nullptr};

Callers

nothing calls this directly

Calls 15

NewConsumerBPMethod · 0.80
NewConsumerConsumeBPMethod · 0.80
NewStoreBPMethod · 0.80
NewStoreBaseMgrBPMethod · 0.80
NewStoreIMMasterBPMethod · 0.80
NewStoreBacklogBPMethod · 0.80
NewStoreSMBPMethod · 0.80
NewProducerBPMethod · 0.80
NewProducerSubBPMethod · 0.80
NewSchedulerBPMethod · 0.80

Tested by

no test coverage detected