lh2debug commented on code in PR #3140:
URL: https://github.com/apache/brpc/pull/3140#discussion_r2522480292


##########
src/bthread/key.cpp:
##########
@@ -672,4 +694,19 @@ void* bthread_get_assigned_data() {
     return bthread::tls_bls.assigned_data;
 }
 
+int bthread_set_span_funcs(bthread_create_span_fn create_fn,
+                            bthread_destroy_span_fn destroy_fn,

Review Comment:
   Thank you for your suggestion. Personally, I think it might be more 
appropriate to manage it under key.cpp, because span is a brpc layer concept, 
not a bthread concept. bthread.cpp should focus on the bthread lifecycle. 
key.cpp is responsible for span's lifecycle triggering points 
(creation/destruction/end) and is decoupled from the specific implementation of 
brpc (span.cpp) through a global callback.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to