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

Method ready_to_run

src/bthread/task_group.cpp:851–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849
850
851void TaskGroup::ready_to_run(TaskMeta* meta, bool nosignal) {
852#ifdef BRPC_BTHREAD_TRACER
853 _control->_task_tracer.set_status(TASK_STATUS_READY, meta);
854#endif // BRPC_BTHREAD_TRACER
855 push_rq(meta->tid);
856 if (nosignal) {
857 ++_num_nosignal;
858 } else {
859 const int additional_signal = _num_nosignal;
860 _num_nosignal = 0;
861 _nsignaled += 1 + additional_signal;
862 _control->signal_task(1 + additional_signal, _tag);
863 }
864}
865
866void TaskGroup::flush_nosignal_tasks() {
867 const int val = _num_nosignal;

Callers 7

run_in_local_task_groupFunction · 0.80
wait_for_butexFunction · 0.80
exchangeMethod · 0.80
start_foregroundMethod · 0.80
_add_sleep_eventMethod · 0.80
interruptMethod · 0.80

Calls 2

set_statusMethod · 0.80
signal_taskMethod · 0.80

Tested by

no test coverage detected