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

Function bthread_about_to_quit

src/bthread/bthread.cpp:513–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513int bthread_about_to_quit() {
514 bthread::TaskGroup* g = bthread::tls_task_group;
515 if (g != NULL) {
516 bthread::TaskMeta* current_task = g->current_task();
517 if(!(current_task->attr.flags & BTHREAD_NEVER_QUIT)) {
518 current_task->about_to_quit = true;
519 }
520 return 0;
521 }
522 return EPERM;
523}
524
525int bthread_timer_add(bthread_timer_t* id, timespec abstime,
526 void (*on_timer)(void*), void* arg) {

Callers 1

EndRPCMethod · 0.85

Calls 1

current_taskMethod · 0.80

Tested by

no test coverage detected