-
Notifications
You must be signed in to change notification settings - Fork 618
Replace ReadOnlyBasicProperties with IReadOnlyBasicProperties #1631
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
Conversation
|
The test failures of rabbitmq-dotnet-client / call-build-test / integration-ubuntu appear to be a fluke, the windows version of the tests were successful. |
michaelklishin
left a comment
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 cannot think of a reason not to use the interface in the API (and the previous API version hasn't shipped in 7.0 GA yet, I think).
|
Apprarently we missed the type |
lukebakken
left a comment
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.
Thanks!
Not my decision, but I wouldn't have used the interface here. Why?
I do see the problem raised in #1630 , but that could've been solved with the |
There is already a second one, the Empty one, but in general I agree.
This is only really true in Tier 0, as soon as Guarded Devirtualization and PGO hits in Tier 1, that problem mostly disappears. It will fast-path even for interfaces and remove the virtual dispatch for these Performance wise, the difference is very very small with GDV and PGO, see https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/ (the part with the list pgo for example, search for "we could possibly reduce overheads").
This is true, without any reservation from my side. |
Not for the relevant path you modified, which is the receiving of messages. The Empty one is to send messages. (Which is also why the ReadOnly variant does not implement all necessary interfaces to use it when sending messages.)
It surely could be improved by it, but to be sure we'd have to measure a typical usecase. In case you didn't get notified, I'll ping you about this @lukebakken |
|
I've read this discussion, and it still seems fine to accept this PR. |
Proposed Changes
After ReadOnlyBasicProperties was changed to a class, we can use IReadOnlyBasicProperties without boxing problems to simplify unit testing.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CONTRIBUTING.mddocument(not all tests pass on my system, some fail for networking issues).
Further Comments
This is mostly an automated change via ReSharper to replace the individual
ReadOnlyBasicPropertieswithIReadOnlyBasicProperties