Class CoroutineHelper

java.lang.Object
io.micronaut.http.server.CoroutineHelper

@Internal @Singleton @Requires(classes=kotlin.coroutines.CoroutineContext.class) public final class CoroutineHelper extends Object
Coroutines helper.
Since:
3.2
Author:
Denis Stepanov
  • Method Details

    • setupCoroutineContext

      public void setupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext)
    • setupCoroutineContext

      public void setupCoroutineContext(HttpRequest<?> httpRequest, reactor.util.context.ContextView contextView, PropagatedContext propagatedContext, @Nullable @Nullable ExecutorService executorService)
      Sets up the coroutine context for a suspended route, dispatching it onto the given executor.
      Parameters:
      httpRequest - The request
      contextView - The reactor context
      propagatedContext - The propagated context
      executorService - The executor the route runs on, or null to use Dispatchers.Default