skuschel / generatorpipeline

Parallelize your data-processing pipelines with just a decorator.
GNU General Public License v3.0
2 stars 3 forks source link

filters to discard elements in the stream #2

Closed skuschel closed 4 years ago

skuschel commented 4 years ago

solved with 80e096cffb0f0811d3d230f96d1665a080bde157

Design idea: As elements can only be discarded in the main process, this is implemented in two steps: The filter is calculated and and elements to be discarded are replaced by None. Finally the main process is fast to discard all None elements in the stream.