RFC: Too many race conditions.
David Daney
ddaney@avtrex.com
Sat May 19 23:49:00 GMT 2007
Florian Weimer wrote:
> * David Daney:
>>>> I have been thinking about:
>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29604
>>>> My inclination is to do nothing. My analysis (int the bug report),
>> makes me think that to fix the race, all I/O operations would have to
>> enter a synchronized block twice. This would create a tremendous
>> overhead.
>>>> Opinions?
>>>> | Any thread currently blocked in an I/O operation upon this socket
> | will throw a SocketException.
>> <http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#close()>
>> This requires a fairly elaborate wrapper anyway. 8-(
>For the most part I think we handle the asynchronous close on a Socket
correctly. It is the race in all I/O code when close is called from a
different thread than other I/O operations that concerns me.
David Daney
More information about the Java
mailing list