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

Method create_group

src/bthread/task_control.cpp:139–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139TaskGroup* TaskControl::create_group(bthread_tag_t tag) {
140 TaskGroup* g = new (std::nothrow) TaskGroup(this);
141 if (NULL == g) {
142 LOG(FATAL) << "Fail to new TaskGroup";
143 return NULL;
144 }
145 if (g->init(FLAGS_task_group_runqueue_capacity) != 0) {
146 LOG(ERROR) << "Fail to init TaskGroup";
147 delete g;
148 return NULL;
149 }
150 if (_add_group(g, tag) != 0) {
151 delete g;
152 return NULL;
153 }
154 return g;
155}
156
157static void print_rq_sizes_in_the_tc(std::ostream &os, void *arg) {
158 TaskControl *tc = (TaskControl *)arg;

Callers 1

worker_threadMethod · 0.80

Calls 1

initMethod · 0.45

Tested by

no test coverage detected