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

Method _on_recycle

src/bthread/execution_queue.cpp:238–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void ExecutionQueueBase::_on_recycle() {
239 // Push a closed tasks
240 while (true) {
241 TaskNode* node = butil::get_object<TaskNode>();
242 if (BAIDU_LIKELY(node != NULL)) {
243 get_execq_vars()->running_task_count << 1;
244 node->stop_task = true;
245 node->high_priority = false;
246 node->in_place = false;
247 start_execute(node);
248 break;
249 }
250 CHECK(false) << "Fail to create task_node_t, " << berror();
251 ::bthread_usleep(1000);
252 }
253}
254
255int ExecutionQueueBase::join(uint64_t id) {
256 const slot_id_t slot = slot_of_id(id);

Callers 1

addressMethod · 0.80

Calls 3

get_execq_varsFunction · 0.85
berrorFunction · 0.85
bthread_usleepFunction · 0.85

Tested by

no test coverage detected