Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I have some web serving code that does a close on the socket stream.
I noticed that the browser would continue "spinning" indicating that
it was still loading the page.
Adding a finish-output after the close solves this problem as
expected. I also expected that force-output would solve the problem
but this seems not to be the case.
force-output initiates the emptying of any internal buffers but does
not wait for completion or acknowledgment to return.
To me the term "emptying" implies that the process that is begun by
force-output will at least do what finish-output would have done
(though it might end up doing more if additional output is sent after
the force output returns but before the finish output would have
Does anyone have any other opinions on this?
I wonder how force and finish are implemented for socket streams.
and how they should be. Does it make any difference whether the
stream has been closed?
It occurs to me that in a multithreaded build I might replace force
with finish in a new thread. That seems to correspond to what I think
force should do. Is this likely to work? In general what is to be
expected from attempts to use the same stream in two different
threads? For example what does it mean for one to finish or force
-output while another is writing?