Alternative to System.runFinalizersOnExit()?

T

Thomas Hawtin

Twisted said:
For an output stream I can see it, if there's a writeback cache to
flush to disk as part of the close and you want to report any failure
there back to the caller (e.g. by throwing an IOException).

I don't see closing an input stream (as long as it was *purely* an
input stream) blocking though, in any sensible implementation. :)

Actually, I think you might have been right for most significant
(desktop) operating systems. In C there is the issue of flushing the
buffer at an application level. At the OS level, I suspect close may
work asynchronously. It's not like sync works on most hard drives these
days anyway (performance figures are better if they are fast and loose).
But don't quote me on that.

Tom Hawtin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,063
Members
48,769
Latest member
Clifft

Latest Threads

Top