Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored BoundedReplaySubject, concurrency enhancements. #649

Closed
wants to merge 1 commit into from

Conversation

akarnokd
Copy link
Member

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

Also mentioned in the forum.

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.

@cloudbees-pull-request-builder

RxJava-pull-requests #583 SUCCESS
This pull request looks good

@akarnokd
Copy link
Member Author

I found a concurrency bug in the read-write refactorings and PR #651 enhancements should appear in here as well.

@akarnokd akarnokd closed this Dec 22, 2013
@akarnokd akarnokd deleted the CReplaySubjImprovement branch January 13, 2014 09:58
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants