-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Methods to accept variable futures. #5688
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
base: master
Are you sure you want to change the base?
Methods to accept variable futures. #5688
Conversation
@kunaljani1100 can you add a test for this ? |
6f903cb
to
a26712b
Compare
Hi @vietj, I have added the success as well as the failures conditions for the |
Currently, the tests have been commented out for right now to find out which tests are the cause of failure. I tested the tests locally and they were working fine for me, but still working on finding out the root cause behind the test failues. |
Motivation:
For the
Future
class, the following functions have been defined repeatedly with multiple definitions accepting multiple number of arguments.For all the 3 methods, there are multiple definitions with multiple number of arguments.
For example,
static CompositeFuture all(Future<?> f1, Future<?> f2)
,static CompositeFuture all(Future<?> f1, Future<?> f2, Future<?> f3)
,static CompositeFuture all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4)
,static CompositeFuture all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5)
, andstatic CompositeFuture all(Future<?> f1, Future<?> f2, Future<?> f3, Future<?> f4, Future<?> f5, Future<?> f6)
are unnecessary declarations of the Future.all() method and can be replaced with a single method that looks like this:static CompositeFuture all(Future<?> ... futures)
This single function is capable of accepting a variable number of futures at once and will eliminate the need for unnecessary method overloading with multiple number of variables.
Conformance:
You should have signed the Eclipse Contributor Agreement as explained in https://github.com/eclipse/vert.x/blob/master/CONTRIBUTING.md
I have signed the eclipse contributor agreement.
Please also make sure you adhere to the code style guidelines: https://github.com/vert-x3/wiki/wiki/Vert.x-code-style-guidelines
I am adhering to the code style guidelines.