Книга: Practical Common Lisp
Bulk Reads
Bulk Reads
One last reading function, READ-SEQUENCE
, works with both character and binary streams. You pass it a sequence (typically a vector) and a stream, and it attempts to fill the sequence with data from the stream. It returns the index of the first element of the sequence that wasn't filled or the length of the sequence if it was able to completely fill it. You can also pass :start
and :end
keyword arguments to specify a subsequence that should be filled instead. The sequence argument must be a type that can hold elements of the stream's element type. Since most operating systems support some form of block I/O, READ-SEQUENCE
is likely to be quite a bit more efficient than filling a sequence by repeatedly calling READ-BYTE
or READ-CHAR
.
- 4 A few ways to use threads
- 6.2.1. Знакомство с Spreadsheet
- 4.1. THREADS
- 4.1.1. Introduction to Threads
- 4.1.3. Design Issues for Threads Packages
- 4.1.4. Implementing a Threads Package
- 7.3.2. Threads
- 8.2.2. Threads
- 9.2.2. Threads
- 10.2. THREADS
- 10.2.1. Introduction to DCE Threads
- Passing Parameters to Threads