Replies: 1 comment 12 replies
-
Just to make sure, you also called |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, I want to say that flecs is amazing. I'm using it for non-game applications and I think it is a revolution in how I can build code. I am trying (learning) how to make my system highly biased towards being entity parallel, and I'm starting to use multi threaded systems.
I have turned on multiple threads (4 in my test case) at the top of the loop, and I have some multi-threaded systems that have very heavy processing in their eval() functions. I had hoped, that each such multi-threaded system would run on a worker thread, but even though they are marked multi_threaded() they just run sequentially on the same thread (printing out the thread id in the eval call...).
There are only a small number of entities (approx the number of threads) that match these systems, and the system query does use/follow relationships to pull in inputs (read), but the output data are updating separate entities in eval.
Any pointers on how to really make the systems run on multiple threads? I've read through the docs quite a few times and I think I'm doing it right, but no luck. They don't seem to get scheduled to run on separate threads.
This would be tremendously powerful if I can get it working or understand what would make a multi_threaded() system not run multi threaded. Perhaps another way to ask the question is what would cause a multi-threaded system to be run single threaded?
I'm using C++ and I'm building from flecs v3.2.10 release code.
Beta Was this translation helpful? Give feedback.
All reactions