Unable to switch back to vertx event loop thread pool after switching to executor thread pool #49578
-
I am unable to switch back to the event loop thread by using
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So, to do this you either need to capture the context and switch back using:
Or use a a context aware executor as documented on https://quarkus.io/guides/vertx-reference#use-a-vert-x-context-aware-scheduler (recommended) |
Beta Was this translation helpful? Give feedback.
Infrastructure.getDefaultExecutor()
does not go back on the event loop. In addition, you should NOT go back to the same event loop, but go back to the same context (slightly different).So, to do this you either need to capture the context and switch back using:
Or use a a context aware executor as documented on https://quarkus.io/guides/vertx-reference#use-a-vert-x-context-aware-scheduler (recommended)