Does AsynchronousSocketChannel.read(ByteBuffer) throw ShutdownChannelGroupException?

cowwoc cowwoc at bbs.darktech.org
Thu Jun 25 10:06:21 PDT 2009


Alan Bateman wrote:
> cowwoc wrote:
>> :
>>     I'm confused. If shutdownNow() causes outstanding operations to 
>> throw AsynchronousCloseException when does 
>> ShutdownChannelGroupException get thrown?
> If you look at the open methods you will see that they are specified to 
> throw ShutdownChannelGroupException if you attempt to open a channel in 
> a group that is shutdown.
> 
> Also, the I/O methods where you specify a completion handler, and 
> attempt to initiate an I/O operation on a channel in a group that has 
> terminated. This case has to fail with the initiating thread throwing an 
> exception (because the completion handler cannot be invoked).
> 
> -Alan.

	Last I checked, Future does not guarantee that its implementation is 
thread safe. Does it?

Gili



More information about the nio-discuss mailing list