AccumulateList#

class caput.pipeline.tasklib.flow.AccumulateList[source]#

Bases: caput.pipeline.tasklib.base.MPILoggedTask

Accumulate the inputs into a list and return as a group.

If group_size is None, return when the task finishes. Otherwise, return every time group_size inputs have been accumulated.

Attributes:
group_sizeint | None

If this is set, this task will return the list of accumulated data whenever it reaches this length. If not set, wait until no more input is received and then return everything.

Methods#

finish()

Remove the internal reference.

next(input_)

Append an input to the list of inputs.