there is AsyncContext class to process requests asynchronous ?
?
Your question already contains the answer: to process requests asynchronously.
So thread pool does not do that ?
Nope. Thread pool is just what it sounds - pool of threads. Servlet api is synchronous by design, which goes many many years back. So to overcome its interface incompatibility they introduced async servlets
I guess your confusion comes from not complete understanding of what is "asynchronous". Here's best real life example I've ever seen of "single-threaded asynchronous" https://youtu.be/aR1Z99XgQew
Обсуждают сегодня