File "intercom"

The library provides non-task channel objects. Just like the task channel objects, they allow multiple producers and multiple consumers. The producers and consumers can be Dogelog tasks and/or π-WAM logical threads, either on the CPU backend or the GPU backend. The supported data packets are currently arrays of 32-bit integers.

When initiated by a task, the channel object provides a promise that is awaited and that can be interrupted. When initiated by a π-WAM logical thread, the channel object is busy waited as part of the logical thread group. It is therefore not recommended to use channel objects in π-WAM logical threads for isolated long waits.

The following intercom predicates are provided:

chan(X):
The predicate succeeds in X with a new crossbar. The crossbar can be used from within Dogelog tasks and/or from within CPU backed π-WAM logical threads.
flit(F):
The predicate succeeds in F with a new flit. The flit can be used from within GPU backed π-WAM logical threads.