Branch
Hash :
8c488859
Author :
Thomas de Grivel
Date :
2019-03-06T11:30:44
fix queue and multi-buffered-output-stream
Common Lisp ticket to evented I/O on any kind of data.
cl-stream streams support any kind of data. READ and WRITE both operate on exactly one stream element of type (STREAM-ELEMENT-TYPE stream). There is no READ-BYTE or READ-CHAR type specific read methods. Actual operations are implemented by specializing STREAM-READ and STREAM-WRITE.
cl-stream streams support reading and writing to sequences of elements with READ-SEQUENCE and WRITE-SEQUENCE. Actual operations are implemented by specializing STREAM-READ-SEQUENCE and STREAM-WRITE-SEQUENCE.
cl-stream streams support non-blocking I/O through the setf-able place (STREAM-BLOCKING-P stream). Actual operations are implemented by specializing (SETF STREAM-BLOCKING-P).
cl-stream streams provide a new stream API which can be used on all common lisp streams too (see cl-stream.lisp).
cl-stream streams can be used as gray-streams by using the steam-gray system.
Base class for all streams.
Returns the type of elements of stream.
Superclass for all errors related to streams.
An error that is signalled when trying to read from or write to a closed stream.
Checks if STREAM is open and signals an error otherwise.
Prevents further read and write operations on STREAM causing them to raise STREAM-CLOSED-ERROR.
Instantiates a stream and ensures it gets closed returning from BODY.
Subclass of STREAM supporting READ operations.
An error which is signalled when an input error occurs on a stream.
Tries to read one element from STREAM. Returns two values : the element or NIL if read failed; and a state indicator which is NIL if read succeeded, :EOF if end of file was reached, or :NON-BLOCKING if read would block.
Reads elements from INPUT-STREAM into SEQ from START to END. Returns two values : the number of elements read, and a state indicator which is NIL if READ-SEQUENCE succeeded :EOF if end of file was reached :NON-BLOCKING if read would block.
Reads elements from INPUT-STREAM into SEQ from START to END until END-ELEMENT is read. Returns two values : the number of elements read, and a state indicator which is NIL if READ-SEQUENCE-UNTIL succeeded :EOF if end of file was reached :NON-BLOCKING if read would block.
Reads elements from INPUT-STREAM from START to END until END-ELEMENT is read. Returns two values : a sequence of elements read, and a state indicator which is NIL if READ-UNTIL succeeded :EOF if end of file was reached :NON-BLOCKING if read would block.
Subclass of STREAM supporting WRITE operations.
An error which is signalled when an output error occurs on a stream.
Tries to write one element to STREAM. Returns a state indicator which is NIL if write succeeded, :EOF if end of file was reached, or :NON-BLOCKING if write would block.
A positive fixnum which may be 0.
Returns a new input buffer for stream.
Returns the stream input buffer, calling MAKE-STREAM-INPUT-BUFFER to create it if needed.
Fills the stream input buffer. Returns NIL if successful, or :EOF if end of file was reached, or :NON-BLOCKING if operation would block.
An output stream that buffers its writes until it gets flushed.
Returns a new output buffer for BUFFERED-OUTPUT-STREAM.
Returns the stream output buffer, calling MAKE-STREAM-OUTPUT-BUFFER to create it if needed.
Tries once to flush the stream output buffer. Returns : NIL if successful, or :EOF if end of file was reached, or :NON-BLOCKING if operation would block.
Flushes the output buffer of BUFFERED-OUTPUT-STREAM by repeatedly calling STREAM-FLUSH-OUTPUT-BUFFER until empty. Returns NIL if output buffer was empty or emptied, or :EOF if end of file was reached, or :NON-BLOCKING if write would block.
A buffered input stream that reads from a sequence.
Binds VAR to a new sequence input stream reading from SEQUENCE. The stream is closed after BODY returns normally or before it is aborted by a control transfer of some kind.
Binds VAR to a new sequence input stream reading from STRING. The stream is closed after BODY returns normally or before it is aborted by a control transfer of some kind.
A buffered output stream that writes to a sequence.
Returns the sequence that was written to SEQUENCE-OUTPUT-STREAM.
Binds VAR to a new sequence output stream with element-type ELEMENT-TYPE. Returns the sequence output stream sequence if BODY returns normally. The stream is closed after BODY returns normally or before it is aborted by a control transfer of some kind.
Binds VAR to a new sequence output stream with element-type character. Returns the sequence output stream string if BODY returns normally. The stream is closed after BODY returns normally or before it is aborted by a control transfer of some kind.