tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Tomcat 7, Servlet 3.0, and Non-Blocking
Date Wed, 09 Nov 2011 09:24:57 GMT
Matthew Tyson <> wrote:

>I guess what I'm asking is if I just start using the Servlet 3.0
>for suspending requests out of the box, will it be a thread blocking
>implementation I'm using?

That depends what you mean by "thread blocking". Once startAsync has been called the thread
that was processing the request/response is released to handle other requests regardless of

>HTTP APR/native is blocking as well, correct?

Wrong. You should read the docs, particularly the summary at the bottom of the HTTP connector
configuration page 

>So if I want to use Servlet 3.0 async (eg, a call to
>and have it be handled without blocking IO, I need to use the NIO

Wrong again. All Servlet IO is blocking IO. If you look at the API you'll see that all read
and write calls are blocking.

You seem to be mixing up blocking and non-blocking IO with whether or not a thread is dedicated
to processing a request/reponse pair for the life of the request/response. They are very different

All connectors release the thread to handle other requests once startAsync has been called.

As an aside, the non-blocking connectors will use non-blocking IO where they can but once
you get to the Servlet API, that is always blocking IO.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message