request for review: 7184932: Remove the temporary Selector usage in the NIO socket adapters

Alan Bateman Alan.Bateman at oracle.com
Thu Oct 4 00:32:37 PDT 2012


On 04/10/2012 03:27, David M. Lloyd wrote:
> I'm wondering if it's really a good idea to hold blockingLock and all 
> those other locks while waiting in Net.poll()?
>
> Rather than preventing anything from changing during blocking, maybe 
> it's better to just interrupt the poller instead.
I/O operations on socket adapters are blocking operations and so are 
required to hold the blocking lock to guard against the associated 
channel from being changed to non-blocking. There is an issue way beyond 
Rob's changes whereby the original specification only specified a single 
lock and that creates issues with concurrent blocking operations, that 
of course a long standing issue requiring an incompatible specification 
change to resolve (maybe someday).

-Alan



More information about the nio-dev mailing list