walterzhaoJR commented on PR #3417:
URL: https://github.com/apache/brpc/pull/3417#issuecomment-5178144663

   @yanglimingcn 
   
   <img width="769" height="574" alt="image" 
src="https://github.com/user-attachments/assets/31f85c9d-d0b9-45b6-b609-7809489f1668";
 />
   
   
   I’d still like to discuss this issue with you further.
   
   Currently, `//:bvar` uses `bthread::RecursiveMutex`, but the 
`bthread_recursive_mutex_*` implementations are provided by `//:bthread`. 
Therefore, a Bazel target depending only on `//:bvar` can compile successfully 
but fail at link time unless it also links `//:bthread`.
   
   The standalone `test_bvar` target does not expose this problem because it 
provides test-only stub implementations. Simply moving the recursive mutex 
functions into another library would not fully solve the dependency cycle, 
since they still depend on `bthread_self()` and `bthread_mutex_*()`, while 
`//:bthread` already depends on `//:bvar`.
   
   Would you prefer that we explicitly require Bazel `//:bvar` users to also 
link `//:bthread`, or should standalone `//:bvar` remain a compatibility 
requirement? The latter would require a larger refactoring to split a 
bvar-independent synchronization core out of bthread.


-- 
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