-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
C++ Script APIFeatureNew feature or requestNew feature or requestIdeaIdeas, concepts, etc. (for features without a clear scope yet)Ideas, concepts, etc. (for features without a clear scope yet)Memory SafetyThread Safetymodule: engineFor features that involve the `engine` module. (optional)For features that involve the `engine` module. (optional)
Description
This lock would help prevent critical modifications of an entity from taking place while it is held. Once Entity Threads are running in parallel (e.g. on a thread scheduler), there is currently no guarantee that operations on other entities will be safe.
The idea here is to have a lock type that leverages RAII to ensure the work in the current scope is executed safely. Once the scope is exited, or if e.g. a loop iteration is completed, a different co_await is hit, etc. we can automatically unlock the entity, allowing other work to be performed.
Locks could be made more efficient by associating the entity's 'batch', rather than the entity itself -- we could then use a mutex/critical-section object per-batch.
Metadata
Metadata
Assignees
Labels
C++ Script APIFeatureNew feature or requestNew feature or requestIdeaIdeas, concepts, etc. (for features without a clear scope yet)Ideas, concepts, etc. (for features without a clear scope yet)Memory SafetyThread Safetymodule: engineFor features that involve the `engine` module. (optional)For features that involve the `engine` module. (optional)