You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/02/08 01:46:02 UTC

[GitHub] [dubbo-go] wenxuwan commented on pull request #1045: Imp: destroy invoker smoothly

wenxuwan commented on pull request #1045:
URL: https://github.com/apache/dubbo-go/pull/1045#issuecomment-774815258


   这边可以用给一个原子操作代表invoker是不是可用状态,然后加一个读写锁,invoke的时候先用原子操作判断是不是可用的,如果可用加读锁,然后再通过原子操作判断一次,如果还可用,调用下面的call,完成后释放读锁。destroy的时候直接把invoker标记为不可用状态,然后阻塞获取写锁,获取成功后然后关闭invoker,释放client就可以了。


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org