JimChengLin commented on PR #2907: URL: https://github.com/apache/brpc/pull/2907#issuecomment-3092409124
> @JimChengLin 我觉得这里还是有问题:当前只有一个worker wait的同时,non-worker起了一个任务,选中了该worker,signal时没同步到waiter num,也会出现信号丢失,task 永远不会被消。类似[#2916 (comment)](https://github.com/apache/brpc/pull/2916#issuecomment-2728608117) 你说的 case #2916 是不是解决了呀。就是 waiter num = 0,只表示当前肯定没有,但是return 的瞬间,如果有新 worker 进来 wait 就 signal lost 了。解决方案是 signal 的时候,无论 waiter num 都变更 butex flag,这样 worker 就有一个double check pattern。 -- 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