-
Notifications
You must be signed in to change notification settings - Fork 754
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
Rework SelectMany #604
Rework SelectMany #604
Conversation
@@ -875,9 +872,7 @@ public override void Run(IObservable<TSource> source) | |||
{ | |||
_isStopped = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why setting to default here is even necessary. The field is already initialized to false upon class instantiation. By removing this, you don't even need to override Run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I figured this might have been from a time where Sinks were supposed to run more than once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even then it makes no sense as sinks had per subscription state. Having the same sink instance service two indenpendent flows invites state clash and concurrency errors.
@@ -1110,9 +1109,7 @@ public override void Run(IObservable<TSource> source) | |||
{ | |||
_isStopped = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, init to default can be omitted.
Save some allocations and inline disposables.