Skip to content
Discussion options

You must be logged in to vote

As you can see, the instances for executor and scheduler are the same. Does this mean that Quarkus uses the same instance for both ManagedExecutor and ScheduledExecutorService? It's a bit irritating because in wildfly the executor and the scheduler are two different instances.

@nimo23 Yes, you can @Inject ExecutorService and @Inject ScheduledExecutorService and it's expected that in both cases you get the same instance (or rather a client proxy delegating to the same instance), i.e. the default executor for blocking tasks.

And indeed, the @Inject @VirtualThreads ExecutorService injects an executor to run tasks on virtual threads.

The @Inject ManagedExecutor mentioned by Matej is a speci…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@nimo23
Comment options

@nimo23
Comment options

@mkouba
Comment options

mkouba Mar 1, 2024
Collaborator

Answer selected by nimo23
@mschorsch
Comment options

@nimo23
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants