forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow when_all and when_all_succeed to take function arguments
The issue with the existing interface is that it is easy to create some of the futures that one wants to wait for and then hit an exception. For example, in when_all(create_fut(), create_fut()); one call to create_fut might return a future, but the next one can throw. By passing functions that return futures to when_all and when_all_succeed, we can convert exceptions into failed futures. Signed-off-by: Rafael Ávila de Espíndola <[email protected]> Message-Id: <[email protected]>
- Loading branch information
Showing
2 changed files
with
87 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters