yichenluan commented on issue #1047: brpc 是否没法保证一个连接上的请求顺序处理?有参数可以控制吗?
URL: https://github.com/apache/incubator-brpc/issues/1047#issuecomment-591771131
 
 
   > > > 
如果必须诶个处理,不能有并发的话,可以在ComandHandler执行你的异步调用后调一个some_event.wait(),然后在DoneClosure里调some_event.signal()来做一个同步
   > > 
   > > 
   > > 这样子不会阻塞整个 pthread 吗?我理解如果用 pthread 的 cv 
的话,整个线程就休眠了吧,这样做的话,会不会所有的线程都阻塞住了,以至于别的连接上的请求都没法处理了,你看下我上面那个方案可行吗
   > 
   > 用bthread层面的cv就可以了,或者看一下bthread/countdown_event.h也能满足需求。
   
   好的,那应该确实可以,bthread_cv 在用户的 pthread 里 notify 也是 OK 的吧?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to