On Mon, May 21, 2012 at 12:16 PM, Mladen Turk <mt...@apache.org> wrote:

> On 05/21/2012 08:01 PM, Costin Manolache wrote:
>
>> On Mon, May 21, 2012 at 10:48 AM, Mark Thomas<ma...@apache.org>  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.
>

You could send an array of sockets to close and get the same 1 JNI call
if performance is the main reason.

My point is that you can implement per-socket timeout with no native code
changes. If you are to make native code changes - bulk close seems a simple
change.

Costin


>
>
> Regards
> --
> ^TM
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org<dev-unsubscr...@tomcat.apache.org>
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

Reply via email to