Review request 6834246: (ch) AsynchronousSocketChannel#write completes ...

Alan Bateman Alan.Bateman at Sun.COM
Mon May 4 11:04:59 UTC 2009

6834246:  (ch) AsynchronousSocketChannel#write completes with wrong 
number of bytes written under load (win)

Sherman - this is a Windows specific stability issue with 
AsynchronousSocketChannel. For cases where I/O operations complete 
immediately then it is possible that we will initiate another I/O 
operation on the same connection before the completion notification is 
delivered. For these cases the notification is simply discarded and the 
OVERLAPPED structure returned to the cache. This reduces the latency to 
the completion handler in many cases but is proving unreliable under 
load on some versions of Windows (something that we need to follow up 
with Microsoft on). The proposed fix plays it safe by deferring all 
completion handling to when the notification is received.  I'm hoping to 
push this to b59 (if approved by the release team). The webrev is here:


More information about the core-libs-dev mailing list