tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: org.apache.tomcat.util.net.AbstractEndpoint#shutdownExecutor lasts 5s?
Date Thu, 07 Nov 2013 09:44:52 GMT
On 07/11/2013 06:36, Konstantin Kolinko wrote:

> SocketInputStream.read( ) used by BIO connector here ignores Thread.interrupt(),
> but if I understand it correctly it can be aborted by calling socket.close().

That should work but I'm not sure we have the necessary state
information (I could be wrong) to work out which threads can be safely
closed.

> Reviewing r1539446 and r1539453...
> http://svn.apache.org/r1539446
> http://svn.apache.org/r1539453
> 
> The old waiting code was added in r1523967
> http://svn.apache.org/r1523967
> 
> I was wondering, why r1539453 introduces
> executorTerminationTimeoutMillis as equal to zero for BIO:
> a) Why there is no such option for an external Executor (owned by Service)

Because the executor could be being used by other connectors that are
not being stopped.

> b) Whether there can be some useful activity besides keep-alives

There were in some cases with WebSocket. Adding this wait reduced
abnormal closes. I'm sure there are still some scenarios where errors
can be generated but adding this wait was part of the fix for the ones
that were being observed at the time.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message