Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent potential race condition in model registration #305
NEBA calculates a set of metadata dor each resource model when it is registered. This metadata is required to map resources to the model as it holds all mapping information that can be calculated in advance.
During registration, we used to rely on the single-threaded handling by the context factory to the extend that the respective registration was not made explicitly thread-safe. With the changes since NEBA 5.0, it is possible (albeit not likely) that resoure model sources (factories) are discovered concurrently.
Thus, we need to ensure the registration of the models is thread-safe.