Skip to content

Conversation

@danielcweber
Copy link
Collaborator

No description provided.

{
Disposable.SetSingle(ref @this._cancel, new ContextDisposable(@this._context, @this._source.SubscribeSafe(@this._observer)));
}
},
Copy link
Contributor

@quinmars quinmars Jun 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can convert the lambda into a method. I find the code with all the @this hard to read.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't come up with another name that would capture that we're really dealling with this. I could change it. I would, however, not like to remove the lambda because apart from that, it makes for good readability IMO. We could pass a method group instead but due to this, that would cost an allocation.

@danielcweber danielcweber merged commit 93c36e0 into dotnet:master Jun 25, 2018
@danielcweber danielcweber deleted the LessAllocationsInSubscribeOnCtxObservable branch June 25, 2018 14:13
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