diff options
| author | gingerBill <bill@gingerbill.org> | 2022-01-10 14:50:28 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-01-10 14:50:28 +0000 |
| commit | 7cc265e14ce3ec08a5908d31441000bdcb4ac645 (patch) | |
| tree | 690cd607687a3879acaabe48d072dc5f358c59d4 /src/check_expr.cpp | |
| parent | 6f3e450c502a8d05653ffcd98c74e2e933a34d1d (diff) | |
Add mutex guards for signature scopes
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index cfffffd9f..1162cefee 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4021,10 +4021,12 @@ void check_did_you_mean_scope(String const &name, Scope *scope) { DidYouMeanAnswers d = did_you_mean_make(heap_allocator(), scope->elements.entries.count, name); defer (did_you_mean_destroy(&d)); + mutex_lock(&scope->mutex); for_array(i, scope->elements.entries) { Entity *e = scope->elements.entries[i].value; did_you_mean_append(&d, e->token.string); } + mutex_unlock(&scope->mutex); check_did_you_mean_print(&d); } |