Interface NonBlockingProvider


public interface NonBlockingProvider
This class allows us to offload a non-blocking startup method to a non-blocking thread. This is implemented in the Quarkus Vert.x extension.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    subscribeAndAwait(Supplier<io.smallrye.mutiny.Uni<T>> uniSupplier)
    Subscribes to the supplied Uni on a Vertx duplicated context; blocks the current thread and waits for the result.
  • Method Details

    • subscribeAndAwait

      <T> T subscribeAndAwait(Supplier<io.smallrye.mutiny.Uni<T>> uniSupplier) throws Throwable
      Subscribes to the supplied Uni on a Vertx duplicated context; blocks the current thread and waits for the result.

      If it's necessary, the CDI request context is activated during execution of the asynchronous code.

      Parameters:
      uniSupplier -
      Throws:
      IllegalStateException - If called on an event loop thread.
      Throwable