Skip to content
Discussion options

You must be logged in to vote

His meaning is that different components or entities in the entity do indeed use different pools, but the initial creation of the pools requires access to a unified object in the registry, which may cause data races in a multi-threaded environment. Is that correct?

The entity pool exists from the beginning. Component pools are lazily created on first use. So, yeah, that's kinda correct.
You can have a dry non-multi-threaded run on the first tick(s) to populate a registry, or just use registry.storage<T>() to force pool creation before entering the multithreaded code.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Idealist-dreamer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question open question
2 participants