rx_utils package

Module contents

UtilsRxPY

rx_utils.from_iterable_factory(factory, scheduler=None)

Constructs an observable for an sync or async iterable factory. Each subscription will create a new iterable via the factory, this allows e.g. to iterate multiple times over generators. If the object returned by the iterable factory is closeable (sync or async) then it will be closed when the observable gets unsubscribed. This is e.g. the case for generators.

Parameters
Return type

Observable

Returns

the observable