-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Allow NonSend components #2486
Copy link
Copy link
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleX-Needs-SMEThis type of work requires an SME to approve it.This type of work requires an SME to approve it.
What problem does this solve or what need does it fill?
Allow data that is not
Sendto be stored in components, increasing API flexibility.This is particularly useful for structs that contain a
Cellor similar, allowing for interior (within-system) parallelization.What solution would you like?
Mirror / share the
NonSendresource API. Systems that have at least oneNonSendcomponent or resource access can only run on the main thread to ensure that the data does not have to be passed between threads.Reusing
NonSendfor both resources and components would be the best naming scheme for this if possible.What alternative(s) have you considered?
Store a reference to a
NonSendresource maybe? Just Don't Do That.Additional context
This will impact the
Componenttrait (#1843), as it will not includeSend + Synctrait bounds. Instead, those will be limited to using components in a parallelizable fashion.