tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <>
Subject Re: APR/native and per socket timeouts.
Date Mon, 21 May 2012 19:16:08 GMT
On 05/21/2012 08:01 PM, Costin Manolache wrote:
> On Mon, May 21, 2012 at 10:48 AM, Mark Thomas<>  wrote:
> My point was that you don't need to change anything in native.
> Leave APR as it is - just use '0' as timeout for the websocket sockets ( or
> any scoket that needs arbitrary timeout ). That will disable the processing
> in maintain - and java side can do the expiration.
> No compilation headaches - the only downside is that the actual expiration
> may happen a bit later.

This approach would be bad for performance.
The reason why I put the maintenance inside native is to
lower down the number of JNI calls.

If you do it in java for each socket, then you will have to
inform the poller to remove each expired from the native pollset.
This mean N*sockets extra JNI calls.

If you look at the implementation I return array of all expired sockets
at once, meaning 1 JNI call.


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

View raw message