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

Function bthread_start_urgent

src/bthread/bthread.cpp:330–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328extern "C" {
329
330int bthread_start_urgent(bthread_t* __restrict tid,
331 const bthread_attr_t* __restrict attr,
332 void * (*fn)(void*),
333 void* __restrict arg) {
334 bthread::TaskGroup* g = bthread::tls_task_group;
335 if (g) {
336 // if attribute is null use thread local task group
337 if (bthread::can_run_thread_local(attr)) {
338 return bthread::TaskGroup::start_foreground(&g, tid, attr, fn, arg);
339 }
340 }
341 return bthread::start_from_non_worker(tid, attr, fn, arg);
342}
343
344int bthread_start_background(bthread_t* __restrict tid,
345 const bthread_attr_t* __restrict attr,

Callers 15

TESTFunction · 0.85
set_before_anybth_implFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
launch_many_bthreadsFunction · 0.85
DBDMultiBthreadFunction · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
epoll_threadFunction · 0.85

Calls 2

can_run_thread_localFunction · 0.85
start_from_non_workerFunction · 0.85

Tested by 15

TESTFunction · 0.68
set_before_anybth_implFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
launch_many_bthreadsFunction · 0.68
DBDMultiBthreadFunction · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68
epoll_threadFunction · 0.68