-
Notifications
You must be signed in to change notification settings - Fork 160
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
Change: replace async_trait with RPITIT #996
Conversation
089ac27
to
498efe4
Compare
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.
Nice!
From my side, it looks good.
+reviewer:@drmingdrmer
It would be also nice to measure in a local microbenchmark (so the network is excluded) the performance before and after the change - it namely significantly reduces the number of (expensive) allocations for futures and enables much better inlining across async functions.
Reviewed 34 of 34 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @drmingdrmer)
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.
It's pretty nice! It's a very clean approach! Thank you!
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @hadronzoo)
|
a93aad6
to
06b431b
Compare
@hadronzoo |
@drmingdrmer thank you for accepting this change! |
Completes #959 by removing
async_trait
and updating theadd_async_trait
proc macro to addSend
bounds when thesinglethreaded
feature is not enabled. This also removes the requirement for annotating trait implementations with a proc macro.For example, the original
RaftRuntime
trait:is transformed into the following when the
singlethreaded
feature is not enabled:This PR is covered by existing unit tests.
This change is