1
Fork 0

Support parallel compiler.

This commit is contained in:
Camille GILLOT 2023-02-04 15:56:21 +00:00
parent 128f2224af
commit 635ff8e2a8

View file

@ -404,9 +404,9 @@ where
} }
#[cfg(parallel_compiler)] #[cfg(parallel_compiler)]
TryGetJob::JobCompleted(query_blocked_prof_timer) => { TryGetJob::JobCompleted(query_blocked_prof_timer) => {
let (v, index) = cache let Some((v, index)) = cache.lookup(&key) else {
.lookup(&key, |value, index| (value.clone(), index)) panic!("value must be in cache after waiting")
.unwrap_or_else(|_| panic!("value must be in cache after waiting")); };
if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) { if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) {
qcx.dep_context().profiler().query_cache_hit(index.into()); qcx.dep_context().profiler().query_cache_hit(index.into());