mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Add an explicit scope around a lock
This commit is contained in:
parent
929a1e0083
commit
7e0265adc2
1 changed files with 5 additions and 1 deletions
|
@ -293,7 +293,11 @@ fn start_phase<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
let skip_constraint_gen = state.cached_subs.lock().contains_key(&module_id);
|
||||
let skip_constraint_gen = {
|
||||
// Give this its own scope to make sure that the Guard from the lock() is dropped
|
||||
// immediately after contains_key returns
|
||||
state.cached_subs.lock().contains_key(&module_id)
|
||||
};
|
||||
|
||||
BuildTask::CanonicalizeAndConstrain {
|
||||
parsed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue