Discontinue Operator
Rocket.discontinue
— Functiondiscontinue()
Creates an operator, which prevents an emitting of self-depending messages and breaks a possible infinite loop. Does nothing if observable scheduled asynchronously.
Producing
Stream of type <: Subscribable{L}
where L
refers to type of source stream
Examples
using Rocket
s = BehaviorSubject(0)
subscription1 = subscribe!(s, logger())
subscription2 = subscribe!(s |> map(Int, d -> d + 1) |> discontinue(), s)
;
# output
[LogActor] Data: 0
[LogActor] Data: 1
See also: AbstractOperator
, RightTypedOperator
, ProxyObservable
, logger