JimChengLin commented on PR #2907: URL: https://github.com/apache/brpc/pull/2907#issuecomment-3101682053
> 我说的问题是先waiter_num + 1 & futex_wait,再改了 signal flag,好像没有memory order来保证这时候waiter_num load大于0吧? 多核是同步网络系统,不能按异步网络的分布式系统(Raft Paxos 考虑的情况)来看。waiter num + 1 然后 futex wait,这个 futex wait 有 release 语义。如果别的观测者能观测到 waiter num = 0,那么观测者视角来看,futex wait 就一定没执行,那执行到的时候一定会发现 signal flag 变更了,wait 挂不上去。 -- 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]
