Entitas
Entitas copied to clipboard
Thread Safety of EntitasCache
Hi,
We are using Entitas on a server and I am currently trying to start server instances in multiple threads, and I noticed that the class EntitasCache is not thread-safe, through the use of the static instance of ObjectCache. Are there any plans to fix this, for example by wrapping that instance inside a ThreadLocal? Are there other places where static instances are used, i.e. should I forget the idea of running different Context instances safely in different threads?
Thanks, Wofgang
I also want to know more tips about how to run Entitas safely in a multi-threading environment.
@wolfgang-wdw If you spot areas that can be improved to better support multi threading I encourage you to make a PR. Unfortunately, I'm not working on a project that uses multiple threads atm, so my attempts to make Entitas safer would be based on artificial scenarios and probably incomplete. But I'd be happy to exchange experience with you and make Entitas work better in your case!
related PR #919