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

don't require tokio rt-multi-thread feature #290

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

lunixbochs
Copy link
Contributor

No description provided.

@DataTriny
Copy link
Member

Hello @lunixbochs
Please run cargo fmt on your branch.

@lunixbochs
Copy link
Contributor Author

done

@mwcampbell
Copy link
Contributor

How exactly does this work? Why is it necessary to spawn a new thread, create a tokio runtime on that thread, send the runtime back, and then exit the thread that created it?

@lunixbochs lunixbochs force-pushed the tokio-rt branch 3 times, most recently from c0f7fa8 to f2f4c93 Compare September 1, 2023 19:26
@lunixbochs
Copy link
Contributor Author

lunixbochs commented Sep 1, 2023

Wow, I think I was completely on autopilot. I'd only done basic compile+println testing because existing versions of Accerciser still don't work with Accesskit on Linux due to #241

Sending a handle back and parking the thread on a sleep works much better. I tested this approach further by manually connecting to the bus and verifying some atspi methods work.

@mwcampbell
Copy link
Contributor

This approach looks good to me. I just belatedly approved the CI workflow.

@DataTriny
Copy link
Member

The winit example seem to still work properly with the tokio feature on.

@lunixbochs
Copy link
Contributor Author

lunixbochs commented Sep 2, 2023

I just realized I can move the runtime into the thread on creation, which simplifies the code quite a bit.

@mwcampbell mwcampbell merged commit cf61e47 into AccessKit:main Sep 2, 2023
@mwcampbell mwcampbell mentioned this pull request Aug 31, 2023
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