wwbmmm commented on issue #2657:
URL: https://github.com/apache/brpc/issues/2657#issuecomment-2144632657

   
你通过future.get()的方式本质上还是阻塞当前线程来等待结果,那么使用异步接口就意义不大了。你可以不使用future.get(),而是在TRITONSERVER_InferenceRequestSetResponseCallback
 设置的callback函数中调用done->Run()来发送回复。
   
这样的话,使用bthread_start_background来启动新线程也是没有必要的,因为新线程里只是发起了一个异步请求。所以,可以直接在SayHello里面同步调用process_thread方法。


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

Reply via email to