Replies: 3 comments
-
No, the Flecs scheduler does not schedule individual systems. It is as you said: each multithreaded system is run on all threads, and entities get divided across threads. IME individual systems are a bad scheduling primitive since they are too small & add too much scheduling overhead in large applications.
This is not possible at the moment. You can only create entities from single threaded systems.
Mutations are added to a command queue per thread. During sync points all commands from all threads are merged. There is no synchronization between threads while systems are running.
You can't create entities from multiple threads- but components created from threads will become available after the next sync point which by default is the end of the frame. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, Sander. These are clear answers. Can you tell a bit more about the sync points? When are these exactly? So, I keep in mind that entities cannot be created from other threads but components can. Is there by any chance any machinery in place to prepare a separate world in a workerthread and then merge it with the main world on the main thread? |
Beta Was this translation helpful? Give feedback.
-
More info here: https://www.flecs.dev/flecs/md_docs_2Systems.html#sync-points The explorer & logging level 1 will show you when sync points happen.
There's no builtin functionality for copying data between worlds. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I am exploring Flecs C++ for a small pet project and I am trying to collect information specifically about multithreading. There is some information about threading systems. But I have some more questions that I cannot find clear information about:
Thank you very much for any information about this!
Beta Was this translation helpful? Give feedback.
All reactions