Skip to content
Discussion options

You must be logged in to vote

In general, when I need to do such kind of things, I use the following pattern:

public Uni<String> longRunningProcess() { ... }

// ...

var csJustInCaseINeedToCheck = longRunningProcess()
     .runSubscriptionOn(Infrastructure.getDefaultWorkerPool() // If it's blocking, make sure it does not block the current thread
    .subscribeAsCompletionStage(); // Trigger the operation and return a completion stage so I can check if it completed or failed

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@DevEnol
Comment options

Answer selected by DevEnol
Comment options

You must be logged in to vote
1 reply
@jponge
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants