Patch for Enhancement Bug # 6313849 and 417591

Alan Bateman Alan.Bateman at Sun.COM
Thu May 17 11:50:52 PDT 2007


Andreas Schaefer wrote:
> :
> I don't think we need to deal with blocking etc because so far people
> had to obtain the underlying resource and close them which would have
> all the problems you mentioned. This new method is not any different
> except that its avoids the upcasts and the fishing for resources.
>   
The specification of the proposed disconnect method will need to set 
expectations. If you are saying that it depends on if the streams can be 
asynchronously closed then this should go into its spec. In that case, 
disconnect may block and you will also need to specify how disconnect 
behaves when invoked by several threads at around the same time. It may 
be best to say that it blocks until the first invocation completes as 
that will ensure that on completion, all resources will have been released.

-Alan.



More information about the net-dev mailing list