You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using EnTT as the main representation of my scene for 3D simulations. I’d like to multithread scene modifications. Let’s say I have many worker threads that may need to modify any component in the registry.
How would you approach this?
I’ve already protected entity creation, but when it comes to modifying the registry, I was thinking about using a queue of commands that are dequeued and executed on a single thread. However, this could result in a large number of small lambdas that might hurt performance.
I also heard about using a local registry per thread that gets merged back into the main one at the end of the frame. Is that a viable approach?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using EnTT as the main representation of my scene for 3D simulations. I’d like to multithread scene modifications. Let’s say I have many worker threads that may need to modify any component in the registry.
How would you approach this?
I’ve already protected entity creation, but when it comes to modifying the registry, I was thinking about using a queue of commands that are dequeued and executed on a single thread. However, this could result in a large number of small lambdas that might hurt performance.
I also heard about using a local registry per thread that gets merged back into the main one at the end of the frame. Is that a viable approach?
I’d be happy to get any feedback on this.
Thanks,
Baptiste
Beta Was this translation helpful? Give feedback.
All reactions