-
Notifications
You must be signed in to change notification settings - Fork 2
channel
Fenhl edited this page Apr 6, 2015
·
1 revision
A channel is a data structure that holds values in a first-in-first-out manner. Each filter has an in-channel and an out-channel.
Channels also transport the three top-level namespaces, and the context. Finally, a channel may be terminated, after which no more values may be pushed (but existing values may still be popped, and the namespaces and context are unaffected).
Finally, channels can be stored inside a namespace, and are then called variables.
Under the hood, channels are fifo queues. Because filters tend to operate in parallel, channels are thread-safe. This can also speed up the language in some cases. Termination is implemented by pushing a special terminator value onto the queue.