This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Trying to understand the Async Servlet for a few days now, no luck yet. May be you could help me. So, what literally happens when we call startAsync()? The request and the response gets somehow put on the server, while the "async" job gets done? For example:
So, what this means is that the initial http Thread "releases" the request, some other worker thread picks it up and does the waiting (the async task) and the the http Thread builds the response.
I mean, from what I have read so far, the async support is for releasing some Thread, right? But if we release some Thread, the async job is done by some other Thread anyway. So, where do we win in the first place? Or may be some Threads are not that expensive as others?
P.S. There are no stupid questions, there are silly answers.