3 Aug 2011 23:58
SBCL data flush problem
I use SBCL on Linux and have noticed a problem when writing lots of data to socket streams created with usocket. In file backend/sbcl.lisp, the function socket-connect creates a stream as follows: (setf (socket-stream usocket) (sb-bsd-sockets:socket-make-stream socket :input t :output t :buffering :full :element-type element-type)) If you look at the code for sb-bsd-sockets:socket-make-stream in sbcl/contrib/sb-bsd-sockets/sockets.lisp, you'll see that it specifies a default value of T for the keyword argument serve-events: (defmethod socket-make-stream ((socket socket) &key input output (element-type 'character) (buffering :full) (external-format :default) timeout auto-close (serve-events t)) This means that SBCL streams created by usocket have a true serve-events property. When writing large amounts of data to several streams, the kernel will eventually stop accepting data from SBCL.(Continue reading)
RSS Feed