sdedic opened a new pull request #2986:
URL: https://github.com/apache/netbeans/pull/2986


   During testing of 
[NETBEANS-5744](https://issues.apache.org/jira/browse/NETBEANS-5744) I have 
found that there are two lockups related to stream closing, which is done 
during process termination:
   - `StreamDecoder` synchronizes around its `read()` (reading the underlying 
InputStream) and so does `close`. So closing an `InputStreamReader` while read 
is pending will block the close() thread.
   - `PipedInputStream` close() just sets a flag, but does not actually wake up 
potentially waiting reader and does not cause writer to return `-1` EOF 
indicator.
   
   The patch attempts to fix it, as close() to streams bound to the process I/O 
may happen asynchronously when the client terminates the process. I've 
attempted to write tests that check the close can be done from other thread 
while read is pending / waiting for the data.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to