Sink Base
- class gpype.backend.sinks.base.sink.Sink[source]
Bases:
INodeBase for a node whose output leaves this process.
A file on disk, a socket, an LSL stream. What they share is not how they are written but where they are: a sink has a location, so a distributed pipeline has to decide which process builds it, and that is what a chain exists to express.
That is the whole content of this class. It declares no parameters, no ports and no behaviour, and deliberately so – it names a property that was previously implicit and unreadable. Before it,
_CsvWriterCorewas aFileWriter(INode)and_LSLSenderCorea bareINode, and nothing in the hierarchy separated either fromCollector, which is anINodetoo. So a reader could not tell which nodes needed a chain, and neither could thePipelineonce it started building them – seeassembly.kind_of.`Collector` is not one, and that is the line this class draws. It “terminates a pipeline in memory instead of in a file”: it hands data back to the caller inside this process, has no external endpoint, and no residency question to answer. A node that only touches data needs no chain, whether or not it happens to sit at the end of a pipeline.
Public as
gp.Sink. Subclass it for a sink of your own; subclassINodedirectly for one that keeps its output in the process, as Collector does.