Discover Packages
sqlflow.org/sqlflow
go
pipe
package
Version:
v0.4.1
Opens a new window with list of versions in this module.
Published: Aug 14, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
ErrClosedPipe will occur when manipulating an already closed pipe
Pipe creates a synchronous in-memory pipe.
It is safe to call Read and Write in parallel with each other or with Close.
Parallel calls to Read and parallel calls to Write are also safe:
the individual calls will be gated sequentially.
Reader reads real data
Close closes the reader; subsequent writes to the
func (r *Reader ) ReadAll() chan interface{}
ReadAll returns the data chan. The caller should
use it as `for r := range pr.ReadAll()`
Writer writes real data
Close closes the writer; subsequent ReadAll from the
read half of the pipe will return a closed channel.
Write writes the item to the underlying data stream.
It returns ErrClosedPipe when the data stream is closed.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.