You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The default AsyncContext.start(Runnable) is used to run the GraphQL request in a separate Thread when enabled. The default implementation by the servlet containers (e.g. Tomcat, Jetty) is to use a Thread of the HTTP worker thread pool. Defeating the purpose of running it in a separate Thread in the first place, since it's then still blocking a HTTP worker thread. See this article for a thorough explanation of this issue, which also discusses the concern whether there's a benefit of using this feature at all.
Describe the solution you'd like
People of this library might still want to be able to use this functionality, but as described in the original feature request the main idea is that it would spawn in a different Thread pool and it would stop blocking HTTP worker Threads. It should be possible to provide your own executor pool that should be used instead.
oliemansm
changed the title
Async execution spawns thread in HTTP worker pool instead of separate async pool
Run async task in separate async executor pool instead of in HTTP worker pool
May 19, 2021
oliemansm
changed the title
Run async task in separate async executor pool instead of in HTTP worker pool
Run async task in thread pool separated from HTTP worker pool
May 19, 2021
Is your feature request related to a problem? Please describe.
The default
AsyncContext.start(Runnable)
is used to run the GraphQL request in a separate Thread when enabled. The default implementation by the servlet containers (e.g. Tomcat, Jetty) is to use a Thread of the HTTP worker thread pool. Defeating the purpose of running it in a separate Thread in the first place, since it's then still blocking a HTTP worker thread. See this article for a thorough explanation of this issue, which also discusses the concern whether there's a benefit of using this feature at all.Describe the solution you'd like
People of this library might still want to be able to use this functionality, but as described in the original feature request the main idea is that it would spawn in a different Thread pool and it would stop blocking HTTP worker Threads. It should be possible to provide your own executor pool that should be used instead.
Example implementation: https://developerlife.com/2011/04/13/creating-asynchronous-servlets-with-tomcat-7-servlet-3-0-api/.
The text was updated successfully, but these errors were encountered: