I've been reading the documentation on this architecture for a while now, and now that I've finally understand how it all fits together, I believe I've found a flaw in it's design.
The docs are rather specific, each system has it's own memory, and each system operates within its own execution state, with minimal interaction with other systems.
At first I thought each system was executed by just one thread, then I realized that the systems can issue sub-tasks, which go into the queue and get executed by whatever available threads.
This means that at any moment there can be more than one thread operating on a system, changing the memory of that system. Doesn't this invite concurrency issues?
The docs do not talk about this. I notice in free-step mode, whenever a "change" is made then the data needs to be sent into the StateManager. This is not the case in lock-step mode, and that must mean the data is modified by the executing thread.
This basically sends me to square 1. I must be misunderstanding something. What is the purpose of duplicating the memory in each system the sake of concurrency, while multiple threads can actually modify the same memory?