Interface VirtualThreadsConfig


@ConfigMapping(prefix="quarkus.virtual-threads") @ConfigRoot(phase=BUILD_AND_RUN_TIME_FIXED) public interface VirtualThreadsConfig
  • Method Details

    • namePrefix

      @WithDefault("quarkus-virtual-thread-") Optional<String> namePrefix()
      Virtual thread name prefix. The name of the virtual thread will be the prefix followed by a unique number.
    • shutdownTimeout

      @WithDefault("1M") Duration shutdownTimeout()
      The shutdown timeout. If all pending work has not been completed by this time then any pending tasks will be interrupted, and the shutdown process will continue
    • shutdownCheckInterval

      @WithDefault("5s") Optional<Duration> shutdownCheckInterval()
      The frequency at which the status of the executor service should be checked during shutdown. Setting this key to an empty value will use the same value as the shutdown timeout.
    • enabled

      @WithDefault("true") boolean enabled()
      A flag to explicitly disabled virtual threads, even if the JVM support them. In this case, methods annotated with @RunOnVirtualThread are executed on the worker thread pool.

      This flag is intended to be used when running with virtual threads become more expensive than plain worker threads, because of pinning, monopolization or thread-based object pool.