chainlet.chainsend module

chainlet.chainsend.lazy_send(chainlet, chunks)

Canonical version of chainlet_send that always takes and returns an iterable

Parameters:
  • chainlet (chainlink.ChainLink) – the chainlet to receive and return data
  • chunks (iterable) – the stream slice of data to pass to chainlet
Returns:

the resulting stream slice of data returned by chainlet

Return type:

iterable

chainlet.chainsend.eager_send(chainlet, chunks)

Eager version of lazy_send evaluating the return value immediately

Note:

The return value by an n to m link is considered fully evaluated.

Parameters:
  • chainlet (chainlink.ChainLink) – the chainlet to receive and return data
  • chunks (iterable) – the stream slice of data to pass to chainlet
Returns:

the resulting stream slice of data returned by chainlet

Return type:

iterable