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

Function ClearTlsParentSpan

src/brpc/span.cpp:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void ClearTlsParentSpan() {
94 using namespace bthread;
95 LocalStorage ls = BAIDU_GET_VOLATILE_THREAD_LOCAL(tls_bls);
96 if (ls.rpcz_parent_span) {
97 static_cast<std::weak_ptr<Span>*>(ls.rpcz_parent_span)->reset();
98 }
99}
100
101bool HasTlsParentSpan() {
102 using namespace bthread;

Callers 2

EndAsParentMethod · 0.85
EndBthreadSpanFunction · 0.85

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected