mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-03 09:14:38 +00:00
Use RwMutex for the Scope
This commit is contained in:
@@ -622,7 +622,10 @@ gb_internal bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us,
|
||||
|
||||
case Entity_ImportName: {
|
||||
Scope *scope = e->ImportName.scope;
|
||||
MUTEX_GUARD_BLOCK(scope->mutex) for (auto const &entry : scope->elements) {
|
||||
rw_mutex_lock(&scope->mutex);
|
||||
defer (rw_mutex_unlock(&scope->mutex));
|
||||
|
||||
for (auto const &entry : scope->elements) {
|
||||
String name = entry.key.string;
|
||||
Entity *decl = entry.value;
|
||||
if (!is_entity_exported(decl)) continue;
|
||||
|
||||
Reference in New Issue
Block a user