You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/11/22 15:31:01 UTC

[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2054: ClientPoolManager#findClientPool(boolean sync, Context targetContext)方法求解

wujimin commented on issue #2054:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2054#issuecomment-731765189


   1. 业务代码发起同步调用(绝对不可能在网络线程中),肯定是在一个普通线程中,此时将这个普通线程与某个特定的网络线程建立绑定关系,以后这个普通线程发起的调用,都走这个绑定的网络线程发出去,以降低多个普通线程发起调用时的锁冲突概率  
   2. 业务代码在普通线程中发起异步调用,任意选择一个网络线程将请求发送出去,不建立绑定关系(避免在一个普通线程中发起多个异步调用时,只能使用一个网络线程)   
   3. 业务代码在网线线程中发起异步调用,直接使用本线程将请求发出去


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