Add globalTimeout operation on Flowable.#6383
Closed
newkek wants to merge 1 commit into
Closed
Conversation
Member
And the same David will close this PR for two reasons: 1) the functionality can be achieved with a small set of existing operators, and 2) please open an issue to discuss feature requests first so that time is not wasted on either end. |
Author
|
Ha - didn't realize @akarnokd was the David from the ML... 🤦♂️ Fair enough, although I thought this would be ok considering I've seen other methods in the Flowable class that are simple shortcuts to other operations, example: Thanks for the quick reply. On both the ML and here. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
While working on a project where we needed to set a finite timeout bound to a flowable and error out if the timeout was reached, I wasn't able to find an operation that would be able to do that in the Flowable class. Only
.timeout()is available but it is to specify a timeout between each item, not the global Flowable.After some help from the mailing list I ended up using
originalFlowable.takeUntil(Flowable.never().timeout())which works very well for the intended purpose (shout-out to David from the mailing list who came up with it).I think it would be valuable to other users who aren't aware of the
takeUntil(Publisher)method, to have this operation available in the library. Please let me know if you think it would be useful as well.I've included a simple unit test as well as Javadocs as best as I could, however I didn't know how to generate a marble schema...
Thanks.