On 09/05/2013 00:06, Kurchi Hazra wrote:


Hi,

com.sun.net.httpServer uses a selector to get notified about interesting
events (such as arrival of a new connection, or data available to read
on an existing connection when using keep-alive), but imposes a timeout of 1000 ms on the select() operation. Although this is not a problem when the server uses a ThreadPool with more than one thread, but for a single threaded server, this timeout
gives rise to a bottleneck and should be reduced to a lower value.

I have proposed 200 ms for the timeout here, but if anyone has preference for a greater
or lower value, I am open to that too.

Bug:http://bugs.sun.com/view_bug.do?bug_id=8014254  (To appear)
Webrev:http://cr.openjdk.java.net/~khazra/8014254/webrev.00/

 Thanks,
- Kurchi

There's something fishy here. So are there are non I/O events queued up that will not be serviced more quickly? Shouldn't adding events cause the Selector to wakeup so that it doesn't matter what the timeout value is.

-Alan.

Reply via email to