chenBright commented on issue #2143: URL: https://github.com/apache/brpc/issues/2143#issuecomment-1453116990
> @chenBright 加个Stop的接口是不是可以解决等待异步线程执行的问题? @chenzhangyi 不行。 目前NamingServiceThread已经调用了bthread_stop通知ns bthread退出了,但是ns bthread不一定能及时退出,例如在需要等rpc完成才能进行Stop的判断逻辑。之前考虑过在NamingServiceThread析构的时候通过brpc::StartCancel来取消rpc,但是需要用户实现GetServers保证能正确取消rpc,这样相当于将工作转移给了用户,而且不好实现。 -- 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]
