Merge

Definition

class broqer.op.Merge(*publishers)[source]

Merge emits of multiple publishers into one stream :param *publishers: source publishers to be merged

Usage

Merge emits of multiple publishers into one stream

Usage:

>>> from broqer import Subject, op
>>> s1 = Subject()
>>> s2 = Subject()
>>> _d = op.Merge(s1, s2) | op.Sink(print, 'Merge:')
>>> s1.emit(1)
Merge: 1
>>> s2.emit('abc')
Merge: abc