RX – What thread am I on?


Threading in RX is usually performed by a set of classes called Schedulers, that implement the IScheduler interface.  I have interviewed a fair few people who don’t fully understand what thread they are on at various points in the pipeline, especially when we throw in a few ObserveOn and SubscribeOn calls.

Continue reading

RX Replay’s Slow Consumer “Problem”

What is Replay?

We have been using RX for some time now although we still get caught out on the intricate details.  Replay is an extremely useful caching mechanism that allows streams to replay previous entries for new subscriptions, based on count, time or a mixture of both.

Under the covers it’s a multicast with a replay subject:

Observable.Multicast<TSource, TSource>(source, new ReplaySubject(bufferSize))

The Problem

Continue reading