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.


Regards
--
^TM

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

Reply via email to