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

Concurrency issues with ReactiveWriteStreamImpl #7

Open
akarnokd opened this issue Nov 19, 2015 · 1 comment
Open

Concurrency issues with ReactiveWriteStreamImpl #7

akarnokd opened this issue Nov 19, 2015 · 1 comment

Comments

@akarnokd
Copy link

I'm glancing through the class and I see a few places where subscriptions is accessed outside its synchronization guard:

  • SubscriptionImpl.request() calls checkSend which calls getAvailable which loops over subscriptions
    • singalError() is also called here which runs removeIf()
  • I believe calling request(Long.MAX_VALUE) multiple times is completely legal with RS (although pointless).
  • SubscriptionImpl.cancel() removes from subscriptions

In addition, since request() may run concurrently with an onNext() emission, there is a risk of concurrent execution of the onXXX methods.

@vietj
Copy link
Contributor

vietj commented Aug 17, 2017

thanks, I will investigate soon! sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants