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

Web Async Rework #3082

Merged
merged 15 commits into from
Oct 16, 2023
Merged

Web Async Rework #3082

merged 15 commits into from
Oct 16, 2023

Conversation

daxpedda
Copy link
Member

@daxpedda daxpedda commented Sep 3, 2023

I tried splitting up the commits in a way that makes sense to review for others but I also for my own sanity.

This basically doesn't use a channel anymore but a simple AtomicUsize to measure the amount of user events sent to appropriately wake up the event loop instead of letting the event loop restart for every user event. Also drops the std::mpsc channel which should improve the "performance" as well.

I added a bunch of related improvements on top as well.

Follow-up to #3081.

@notgull
Copy link
Member

notgull commented Sep 3, 2023

Once smol-rs/async-channel#59 is merged, would you be able to replace this functionality with async-channel?

@daxpedda
Copy link
Member Author

daxpedda commented Sep 3, 2023

Only the channel module. I assume it would also be an improvement over wrapping std::mpsc into async.

I could look into gating this stuff behind target_feature = "atomics" so most users don't have to pay the price of these dependencies, admittedly very small dependencies.

@daxpedda
Copy link
Member Author

daxpedda commented Sep 3, 2023

This is ready now, but I'm gonna let it simmer for a while.

@daxpedda daxpedda added this to the Version 0.29.0 milestone Sep 3, 2023
@daxpedda daxpedda mentioned this pull request Sep 3, 2023
2 tasks
@daxpedda daxpedda merged commit 48f6582 into rust-windowing:master Oct 16, 2023
50 checks passed
kchibisov pushed a commit to kchibisov/winit that referenced this pull request Oct 17, 2023
kchibisov pushed a commit that referenced this pull request Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants