Use mutex_try_lock in check_proc_info
This commit is contained in:
1 parent
09c26e6be0
commit
df2767311f
1 file changed
+4
-1
+4
-1
@@ -5050,7 +5050,10 @@ gb_internal bool check_proc_info(Checker *c, ProcInfo *pi, UntypedExprInfoMap *u
|
||||
return false;
|
||||
}
|
||||
|
||||
MUTEX_GUARD(&pi->decl->proc_checked_mutex);
|
||||
if (!mutex_try_lock(&pi->decl->proc_checked_mutex)) {
|
||||
return false;
|
||||
}
|
||||
defer (mutex_unlock(&pi->decl->proc_checked_mutex));
|
||||
|
||||
Entity *e = pi->decl->entity;
|
||||
switch (pi->decl->proc_checked_state.load()) {
|
||||
|
||||
Reference in new issue
Block a user