Move RAC concurrent decode from program to library

This commit is contained in:
Nigel Tao committed 2019-08-31 17:14:28 +10:00
1 parent e0d9749f4e
commit 7753d147b7
7 files changed
+518 -164

No files matched your search

+6 -1
View File
@@ -153,7 +153,12 @@ func (b *writeBuffer) compact() {
const NoResourceUsed int = -1
// CodecWriter specializes a Writer to encode a specific compression codec.
//
// Instances are not required to support concurrent use.
type CodecWriter interface {
// Clone duplicates this. The clone and the original can run concurrently.
Clone() CodecWriter
// Compress returns the codec-specific compressed form of the concatenation
// of p and q.
//
@@ -572,6 +577,6 @@ func (w *Writer) Close() error {
w.err = err
return err
}
w.err = errWriterIsClosed
w.err = errAlreadyClosed
return nil
}