Add mutex to Scope lookups and insertions

This commit is contained in:
gingerBill
2021-08-18 11:17:14 +01:00
parent 84b0da44db
commit a01c946c20
4 changed files with 55 additions and 43 deletions
+2
View File
@@ -334,6 +334,8 @@ void override_entity_in_scope(Entity *original_entity, Entity *new_entity) {
if (found_scope == nullptr) {
return;
}
mutex_lock(&found_scope->mutex);
defer (mutex_unlock(&found_scope->mutex));
// IMPORTANT NOTE(bill, 2021-04-10): Overriding behaviour was flawed in that the
// original entity was still used check checked, but the checking was only