-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support !Send + !Sync Resources #456
Comments
Supporting |
Could this also apply to Components? E.g. I have a component that's |
Also, this will come up for web support, because |
Where is the problem with Mutex or RWLock? |
Adding !Send + !Sync resources should be relatively straightforward. Supporting !Send + !Sync components will be a bit harder, but I'm 100% ok with modifying hecs to support this. |
I suppose wrapping a |
I don't think this is a requirement. I mean you can use send + sync in wasm as long you do not create any threads. |
Faking it does work in a single threaded wasm runtime: bevy/crates/bevy_winit/src/winit_windows.rs Line 111 in 34c6f5f
|
Supporting threads in wasm is a hard requirement IMO. This can work for the time being, but I'm sure other use cases for I would also caution against bare |
Yeah, the godot-rust bindings do something similar with |
Hi,
I have a type that's neither
Send
norSync
and I can't find a way to use this data as part of theSchedule
.Resources
,System
andIntoThreadLocalSystem
all have requirements onSend + Sync
. Would it be possible to relax this?The text was updated successfully, but these errors were encountered: