Netflix/RxJava — pull request #649 by akarnokd (2013-12-20 23:02:16+00:00)
Title: Refactored BoundedReplaySubject, concurrency enhancements.

Refactored the formerly ```rx.operators.OperationReplay.CustomReplaySubject``` into ```rx.subjects.BoundedReplaySubject``` with all sorts of ```create``` factory methods.

Also mentioned in the [forum](https://groups.google.com/forum/#!topic/rxjava/SqwS5kz-lRA).

Changed to the concurrency logic:

The former ```Lock``` is now split into a ```ReadWriteLock```. In write phase, the buffer is updated; in read phase, the observers are notified. New subscribers will enter the read phase so replaying can be run in-parallel with the already subscribed observers.

However, the source side of the subject is still blocked while replaying. I can't imagine any non-convoluted way to make this less blocking or lock free.