diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 21:00:43 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-09-10 21:00:43 +0100 |
| commit | 549edcc0f90d632587c427e5d4189721323bd4a8 (patch) | |
| tree | fa683b18b3a392ce2b3ec881c1c940c9e972c2af /src/check_type.cpp | |
| parent | 34e3d3078057fdf22c2f91847096e0a3e098fa82 (diff) | |
Use a `RwMutex` instead of `BlockingMutex`
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index aec416921..71db34afa 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -321,8 +321,8 @@ gb_internal void add_polymorphic_record_entity(CheckerContext *ctx, Ast *node, T e->TypeName.objc_metadata = original_type->Named.type_name->TypeName.objc_metadata; auto *found_gen_types = ensure_polymorphic_record_entity_has_gen_types(ctx, original_type); - mutex_lock(&found_gen_types->mutex); - defer (mutex_unlock(&found_gen_types->mutex)); + rw_mutex_lock(&found_gen_types->mutex); + defer (rw_mutex_unlock(&found_gen_types->mutex)); for (Entity *prev : found_gen_types->types) { if (prev == e) { |