This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Too many race conditions.


David Daney writes:
 >  
 > The semantics of files and pipes change if you don't close them when the 
 > application asks for them to be closed.  In a pipe for example the read 
 > side would block waiting for the EOF.  For a file, the filesystem 
 > containing the file could not be unmounted.  Waiting for a potentially 
 > blocking I/O operation to finish before closing could cause deadlock.

Is it true that in such cases the current code would cause incorrect
operation?  That all we would be doing is, at worst, exchanging one
sort of incorrect behaviour for another?
  
 > Also counting references requires obtaining some type of mutual 
 > exclusion lock twice for each I/O operation.

Atomic counters are easy enough to do.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]