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

impl AsyncExecutor for tokio::runtime::Handle #712

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Aug 21, 2023

This will allow Tokio-based async benching without necessarily having access to the Runtime itself (e.g. inside of a #[tokio::main] function); a Handle is always obtainable via Handle::current().

@lemmih
Copy link
Collaborator

lemmih commented Aug 24, 2023

Anyone up for reviewing this PR?

@waywardmonkeys
Copy link
Contributor

@kpreid Could you rebase this forward to fix the merge conflict?

@lemmih Since a tokio::runtime::Handle is just another way to get access to the currently running Runtime, I think this PR looks correct to me (without expert knowledge of tokio).

@kpreid
Copy link
Contributor Author

kpreid commented Oct 23, 2023

I've rebased, but I noticed something weird while working with git on it: the affected files seem to have CRLF line endings (even though the .editorconfig file suggests the repo should be all LF). This is probably just either harmless or something to fix in another PR, but I thought I'd mention it in case I'm missing something.

@waywardmonkeys
Copy link
Contributor

@kpreid Sorry to ask again, but could you rebase this (hopefully last time)?

This will allow Tokio-based async benching without necessarily having
access to the `Runtime` itself (e.g. inside of a `#[tokio::main]`
function); a `Handle` is always obtainable via `Handle::current()`.
@kpreid
Copy link
Contributor Author

kpreid commented Jul 27, 2024

Done. I notice that async_executor.rs now has LF endings, but benchmarking_async.md still has CRLF. The PR should be consistent with existing text in each file.

Copy link
Contributor

@waywardmonkeys waywardmonkeys left a comment

Choose a reason for hiding this comment

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

@lemmih this should be good to go!

Thanks, @kpreid ! I will take a look at the line endings after this lands.

@waywardmonkeys waywardmonkeys mentioned this pull request Jul 27, 2024
@lemmih lemmih merged commit a5f00c4 into bheisler:master Aug 4, 2024
5 checks passed
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.

3 participants