From 67f787e86602efc7e4007fb6bbc970a2fcf613f5 Mon Sep 17 00:00:00 2001 From: Gabor Melis Date: Thu, 1 Jan 2009 20:50:41 +0000 Subject: [PATCH] 1.0.24.1: Reading from a TWO-WAY-STREAM need not flush the output stream. In fact, it unnecessarily complicates writing thread-safe code as readers and writers access the output stream concurrently. --- NEWS | 6 +++++- src/code/stream.lisp | 1 - version.lisp-expr | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index b63dea6..6b3c2b9 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,8 @@ ;;;; -*- coding: utf-8; fill-column: 78 -*- +changes in sbcl-1.0.25 relative to 1.0.24: + * improvement: reading from a TWO-WAY-STREAM does not touch the output + stream anymore making it thread safe to have a concurrent reader and + a writer, for instance, in a pipe. changes in sbcl-1.0.24 relative to 1.0.23: * new feature: ARRAY-STORAGE-VECTOR provides access to the underlying data vector of a multidimensional SIMPLE-ARRAY. @@ -1190,7 +1194,7 @@ changes in sbcl-0.9.14 relative to sbcl-0.9.13: default, and DISABLE-DEBUGGER and ENABLE-DEBUGGER also affect the low-level debugger. * enchancement: RUN-PROGRAM is now able to extract the file-descriptor - from SYNONYM-STREAM and TWO-WAY-STEAMS provided they can be decomposed + from SYNONYM-STREAM and TWO-WAY-STREAM provided they can be decomposed down to an SB-SYS:FD-STREAM, allowing direct communication in more cases. Temporary files and pipes are still used as a fallback strategy. diff --git a/src/code/stream.lisp b/src/code/stream.lisp index 245e47e..74331be 100644 --- a/src/code/stream.lisp +++ b/src/code/stream.lisp @@ -939,7 +939,6 @@ (macrolet ((in-fun (name fun &rest args) `(defun ,name (stream ,@args) - (force-output (two-way-stream-output-stream stream)) (,fun (two-way-stream-input-stream stream) ,@args)))) (in-fun two-way-in read-char eof-error-p eof-value) (in-fun two-way-bin read-byte eof-error-p eof-value) diff --git a/version.lisp-expr b/version.lisp-expr index c7362af..61bdc6d 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.24" +"1.0.24.1" -- 1.7.10.4