Split the if
to release the lock earlier
This commit is contained in:
parent
dfae9c993d
commit
afe4c16b29
1 changed files with 14 additions and 9 deletions
|
@ -535,18 +535,23 @@ impl<K: DepKind> DepGraph<K> {
|
||||||
// value to an existing node.
|
// value to an existing node.
|
||||||
//
|
//
|
||||||
// For sanity, we still check that the loaded stable hash and the new one match.
|
// For sanity, we still check that the loaded stable hash and the new one match.
|
||||||
if let Some(prev_index) = data.previous.node_to_index_opt(&node)
|
if let Some(prev_index) = data.previous.node_to_index_opt(&node) {
|
||||||
&& let Some(dep_node_index) = { data.current.prev_index_to_index.lock()[prev_index] }
|
let dep_node_index = data.current.prev_index_to_index.lock()[prev_index];
|
||||||
{
|
if let Some(dep_node_index) = dep_node_index {
|
||||||
crate::query::incremental_verify_ich(cx, data, result, prev_index, hash_result);
|
crate::query::incremental_verify_ich(cx, data, result, prev_index, hash_result);
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
if hash_result.is_some() {
|
if hash_result.is_some() {
|
||||||
data.current.record_edge(dep_node_index, node, data.prev_fingerprint_of(prev_index));
|
data.current.record_edge(
|
||||||
|
dep_node_index,
|
||||||
|
node,
|
||||||
|
data.prev_fingerprint_of(prev_index),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dep_node_index;
|
return dep_node_index;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mut edges = SmallVec::new();
|
let mut edges = SmallVec::new();
|
||||||
K::read_deps(|task_deps| match task_deps {
|
K::read_deps(|task_deps| match task_deps {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue