fix: deadlock bug

This commit is contained in:
Shunsuke Shibayama 2023-10-08 12:19:11 +09:00
parent f676f22d6c
commit d13c0e959d
2 changed files with 26 additions and 12 deletions

View file

@ -66,11 +66,7 @@ impl Context {
} else if let Some(ctx) = self.get_module_from_stack(&NormalizedPathBuf::from(path)) {
return Some(ctx);
}
if self.shared.is_some()
&& self.promises().is_registered(path)
&& !self.promises().is_finished(path)
&& (self.mod_cache().get(path).is_none() && self.py_mod_cache().get(path).is_none())
{
if self.shared.is_some() && self.promises().is_registered(path) && !self.mod_cached(path) {
let _result = self.promises().join(path);
}
self.opt_mod_cache()?