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

On wasm32, egui::mutex::Mutex<T> requires T: Sync to be Sync #3102

Closed
NickHu opened this issue Jun 21, 2023 · 0 comments · Fixed by #3236
Closed

On wasm32, egui::mutex::Mutex<T> requires T: Sync to be Sync #3102

NickHu opened this issue Jun 21, 2023 · 0 comments · Fixed by #3236
Labels
bug Something is broken
Milestone

Comments

@NickHu
Copy link

NickHu commented Jun 21, 2023

This is inherited from the underlying implementation for wasm32, from atomic_refcell, and means that you can't do the standard pattern of sharing Send values between threads by wrapping them in an Arc<Mutex<_>>.

@NickHu NickHu added the bug Something is broken label Jun 21, 2023
@emilk emilk added this to the 0.23.0 milestone Aug 10, 2023
emilk added a commit that referenced this issue Aug 11, 2023
Replace `atomic_refcell` with `parking_lot` on wasm32.

`parking_lot` has had problems running on wasm32 before
(#1401)
but it works these days.
If we have problems again we can always switch to `std::sync::Mutex`.

Closes #3102
emilk added a commit that referenced this issue Aug 11, 2023
Replace `atomic_refcell` with `parking_lot` on wasm32.

`parking_lot` has had problems running on wasm32 before
(#1401)
but it works these days.
If we have problems again we can always switch to `std::sync::Mutex`.

Closes #3102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants