Hi Ilya,
thank you for the heads-up and sorry for the improper fix, which I will be backing out. I made the change after having discussed with David Lichteblau, and I have wrongly got the impression that FORCE-OUTPUT and FINISH-OUTPUT without any other keyword parameters should be basically equivalent. I have been pondering whether the FINISH-OUTPUT, with waiting for the flush to have finished, is the right thing. What is really required at this point is making sure that the data eventually arrives at the client, not neccessarily waiting for that to have happened.
I am not quite sure what do do now. I personally don't use SBCL so I am not affected by the problem. It seems that neither of the two approaches that have been tried properly work for SBCL - FORCE-OUTPUT potentially loses data, and FINISH-OUTPUT potentially hangs the server.
Any suggestions?
Thanks, Hans
On Mon, Apr 4, 2011 at 8:08 AM, Ilya Perminov iperminov@dwavesys.com wrote:
Hi Hans,
I think changing FINISH-OUTPUT back to FORCE-OUTPUT is wrong. It reintroduces the bug I reported a couple of months ago: http://common-lisp.net/pipermail/tbnl-devel/2011-February/005411.html
Using (FORCE-OUTPUT S) in conjunction with (CLOSE S :ABORT T) does not guarantee all buffered output is sent to the socket before the socket is closed. That is probably why replacing FINISH-OUTPUT with FORCE-OUTPUT "fixed" Andrey's problem: the new version simply discards data instead of writing it to the socket.
Ilya
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel