This is the mail archive of the mauve-discuss@sources.redhat.com mailing list for the Mauve 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: gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken


Stephen Crawley wrote:
> Java programs that rely on the GC to find / close file handles are
> non-portable and (IMO) broken.  A portable program cannot depend on
> the GC running soon enough to get around a problem with running
> out of file descriptors.

While I agree with your general point (and that this test shouldn't be
in Mauve), I would like to add a small footnote:

The nio memory mapped file API *requires* you to rely on the GC to close
the files.

Personally, I happen to think that the API is broken because of this,
but as of 1.4 (haven't looked at 1.5 yet) this is the sad reality.

Regards,
Jeroen


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