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

Function bthread_set_span_funcs

src/bthread/bthread.cpp:655–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655int bthread_set_span_funcs(bthread_create_span_fn create_fn,
656 bthread_destroy_span_fn destroy_fn,
657 bthread_end_span_fn end_fn) {
658 if ((create_fn && destroy_fn && end_fn) ||
659 (!create_fn && !destroy_fn && !end_fn)) {
660 bthread::g_create_bthread_span = create_fn;
661 bthread::g_rpcz_parent_span_dtor = destroy_fn;
662 bthread::g_end_bthread_span = end_fn;
663 return 0;
664 }
665
666 errno = EINVAL;
667 return -1;
668}
669
670} // extern "C"
671

Callers 2

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68