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

Method _release_last_context

src/bthread/task_group.cpp:483–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void TaskGroup::_release_last_context(void* arg) {
484 TaskMeta* m = static_cast<TaskMeta*>(arg);
485 if (m->stack_type() != STACK_TYPE_PTHREAD) {
486 return_stack(m->release_stack()/*may be NULL*/);
487 } else {
488 // it's _main_stack, don't return.
489 m->set_stack(NULL);
490 }
491 return_resource(get_slot(m->tid));
492}
493
494int TaskGroup::start_foreground(TaskGroup** pg,
495 bthread_t* __restrict th,

Callers

nothing calls this directly

Calls 6

return_stackFunction · 0.85
stack_typeMethod · 0.80
release_stackMethod · 0.80
set_stackMethod · 0.80
get_slotFunction · 0.70
return_resourceFunction · 0.50

Tested by

no test coverage detected