chenBright commented on PR #2765:
URL: https://github.com/apache/brpc/pull/2765#issuecomment-2365484149

   > 这个是否会影响性能?
   
   
之前的实现不会影响性能,但是没用原子变量没法保证正确性。现在用原子变量实现后会导致性能退化,MutexTest.performance测试发现锁的平均运行时间慢了50%左右,所以该功能只作为debug手段,默认关闭,只有编译bRPC库时定义了DEBUG_MUTEX宏才会开启该功能。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to