[Concurrency] Support concurrent operations with entities
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
when spawning threads during Update (in my case in the update of a gameSystem)
and adding or removing Components concurrently, then sometimes the engine crashes.
even when working on different entities.
i think its the lazy loading mechanism that "connects" diffrent entity operations.
in my case it was/is in EntityManager.CheckEntityComponentWithProcessors
when changing the mapping.
(MapComponentTypeToProcessors.Add(componentType, processorsForComponent);)
iirc it crashes on other locations too.
since maybe the engine wasnt designed for such a process, i made it a feature request,
if u also think its a bug then change it :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing concurrent component additions and removals during Update, including the case where operations affect different entities. Inspect EntityManager.CheckEntityComponentWithProcessors and the MapComponentTypeToProcessors mapping mentioned in the report. Done means the engine no longer crashes during these concurrent operations, including crashes reported at other locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100