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

Function can_run_thread_local

src/bthread/bthread.cpp:300–303  ·  view source on GitHub ↗

Meet one of the three conditions, can run in thread local attr is nullptr tag equal to thread local tag equal to BTHREAD_TAG_INVALID

Source from the content-addressed store, hash-verified

298// tag equal to thread local
299// tag equal to BTHREAD_TAG_INVALID
300BUTIL_FORCE_INLINE bool can_run_thread_local(const bthread_attr_t* __restrict attr) {
301 return attr == nullptr || attr->tag == bthread::tls_task_group->tag() ||
302 attr->tag == BTHREAD_TAG_INVALID;
303}
304
305struct TidTraits {
306 static const size_t BLOCK_SIZE = 63;

Callers 2

bthread_start_urgentFunction · 0.85
bthread_start_backgroundFunction · 0.85

Calls 1

tagMethod · 0.80

Tested by

no test coverage detected