channels#

Channels#

Communication channels used for passing files and data between components.

The two main channel types of interest to users are DataChannel and FileChannel. The former is a wrapper around multiprocessing.Queue, while the latter uses channel-specific directories as a shared space to transmit files. All channels are unidirectional - a connected node cannot send and receive to the same channel. Either can be assigned to a Port using the interface.Port.set_channel method.

Custom channels are possible and should subclass from the Channel abstract base class. This will also require modifying the graph.Graph.connect method to use this new channel.

Classes

Channel()

Represents a communication channel that will be plugged into a Port.

DataChannel(size)

A communication channel for data in the form of python objects.

FileChannel([mode])

A communication channel for data in the form of files.

Exceptions

ChannelEmpty

Raised for empty channels, will typically be caught by the port.

ChannelException

Raised for miscallaneous channel issues.

ChannelFull

Raised for full channels, will typically be caught by the port.