Skip to content

Create multi from "while(hasNext)" loop #1225

Answered by jponge
jtama asked this question in Q&A
Discussion options

You must be logged in to vote

The emitter doesn't have to be a in loop, and it can outlive the lifespan of the lambda / callback.

I'd suggest you use one of the CompletableFuture method to be notified when it completes, then push elements using emitter, then call getPaginateItems again.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jtama
Comment options

@jponge
Comment options

@jtama
Comment options

Answer selected by jtama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants