-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you consider let com.alipay.sofa.rpc.message.ResponseFuture inherit java.util.concurrent.CompletionStage? #945
Comments
Hi @guyeu, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.
The existing asynchronous usage of sofarpc includes callback and Future, both of which have relatively large limitations;-Callback-service level callbacks have little significance, and functions and Filter overlap;-Call level callbacks are more cumbersome to handle , It is not intuitive to write;-Future-the current Future still has to block the current thread to wait for the result;-incompatible with the framework such as reactor; java1.8 introduced java.util.concurrent.CompletableFuture this powerful asynchronous programming auxiliary class At present, users of sofarpc can only barely achieve compatibility through this code: |
以前代码是基于jdk6的。一直兼容jdk6.所以这个也没用,我们看一下 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@EvenLjj hi, is this issue is solved? |
您好,我想认领这个任务 |
https://github.com/dajitui/sofa-rpc/actions/runs/4606971144 |
代码格式不对,format 一下
本地执行一下,会自动格式化,然后commit一下
|
现有的sofarpc的异步使用方式有回调和Future两种,都有比较大的局限性;
java1.8引入了java.util.concurrent.CompletableFuture这个强大的异步编程辅助类,目前sofarpc的使用者只能通过这样的代码勉强做到兼容:
是否可以考虑让com.alipay.sofa.rpc.message.ResponseFuture继承java.util.concurrent.CompletionStage, 来提供更好的异步编程支持?
The text was updated successfully, but these errors were encountered: