ZjuYTW commented on issue #1497:
URL: https://github.com/apache/brpc/issues/1497#issuecomment-1546704224
对第一点的解释还有点模糊,楼上的大佬 @ZeroLiu2018 提到需要将本bthread先睡眠再进行入列,
否则会有stack切换的问题。我可以理解成——先将本bthread入列后如果被别的TaskGroup 直接Steal了可能会有奇怪的问题吗?
然后其实这里我觉得如果这种情况是否可以避免——通过不设置remained而是直接执行butex_wait,因为走到wait_for_butex里面的TaskMeta有两种情况,一种是需要阻塞在butex下面,另一种是发现在同步点的时候实际已经可以拿到锁开始跑了,就可以避免把本bthread
yield出去。
--
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]