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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kpreid
Copy link

@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).

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
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.

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.

None yet

3 participants