final classConcurrentObserver[-T] extends Observer[T]
An observer wrapper that ensures the underlying implementation does not
receive concurrent onNext / onError / onComplete events - for those
cases in which the producer is emitting data too fast or concurrently
without fulfilling the back-pressure requirements.
The Future returned by onNext on each call is guaranteed to be
completed only after downstream has processed the call.
For high-contention scenarios it is very expensive in terms of both
memory usage and throughput. If one needs to send onNext/onComplete
events concurrently and buffering, but without the requirement for
onNext to return a Future that's only complete when the event was
processed by downstream (i.e. thread-safe buffering), then one is better
served by BufferedObserver.
An observer wrapper that ensures the underlying implementation does not receive concurrent onNext / onError / onComplete events - for those cases in which the producer is emitting data too fast or concurrently without fulfilling the back-pressure requirements.
The
Future
returned byonNext
on each call is guaranteed to be completed only after downstream has processed the call.For high-contention scenarios it is very expensive in terms of both memory usage and throughput. If one needs to send
onNext/onComplete
events concurrently and buffering, but without the requirement foronNext
to return aFuture
that's only complete when the event was processed by downstream (i.e. thread-safe buffering), then one is better served by BufferedObserver.