Revert "debug: mark"

This reverts commit 5eb0a50a23.
This commit is contained in:
Shunsuke Shibayama 2024-09-16 21:32:01 +09:00
parent 6781db1588
commit fd76f56ba4
4 changed files with 4 additions and 16 deletions

View file

@ -340,7 +340,6 @@ impl SharedModuleCache {
where
NormalizedPathBuf: Borrow<Q>,
{
println!("343");
let mut cache = loop {
if let Some(cache) = self.0.try_borrow_mut() {
break cache;

View file

@ -160,7 +160,6 @@ impl SharedPromises {
}
pub fn wait_until_finished(&self, path: &NormalizedPathBuf) {
println!("163");
if self.promises.borrow().get(path).is_none() {
panic!("not registered: {path}");
}
@ -180,11 +179,9 @@ impl SharedPromises {
return Ok(());
}
if SINGLE_THREAD {
println!("182: {path}");
assert!(self.is_joined(path));
return Ok(());
}
println!("!?: {path}");
// Suppose A depends on B and C, and B depends on C.
// In this case, B must join C before A joins C. Otherwise, a deadlock will occur.
let children = self.graph.children(path);
@ -226,14 +223,14 @@ impl SharedPromises {
paths.push(path.clone());
}
for path in paths {
self.join(&path).unwrap();
let _result = self.join(&path);
}
}
pub fn join_all(&self) {
let paths = self.promises.borrow().keys().cloned().collect::<Vec<_>>();
for path in paths {
self.join(&path).unwrap();
let _result = self.join(&path);
}
}