Skip to content

Commit 2bc96a7

Browse files
pzhan9facebook-github-bot
authored andcommitted
Change logs to asserts related to ChildStopped (#373)
Summary: Pull Request resolved: #373 Children should have been unlinked before the `ChildStopped` signal was sent: https://www.internalfb.com/code/fbsource/[075311be8caaa54d5a8a8269bd12d6bb700dfa65]/fbcode/monarch/hyperactor/src/proc.rs?lines=919-921 Reviewed By: mariusae Differential Revision: D77456838 fbshipit-source-id: 6f74130598537343ad282f2fa8cba5b3d3bf94f8
1 parent e4d7d9e commit 2bc96a7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

hyperactor/src/proc.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,7 @@ impl<A: Actor> Instance<A> {
10141014
while self.cell.child_count() > 0 {
10151015
match self.signal_receiver.recv().await? {
10161016
Signal::ChildStopped(pid) => {
1017-
if let Some(child) = self.cell.get_child(pid) {
1018-
self.cell.unlink(&child);
1019-
}
1017+
assert!(self.cell.get_child(pid).is_none());
10201018
}
10211019
_ => (),
10221020
}
@@ -1061,12 +1059,7 @@ impl<A: Actor> Instance<A> {
10611059
break 'messages;
10621060
},
10631061
Signal::ChildStopped(pid) => {
1064-
let result = self.cell.get_child(pid);
1065-
if let Some(child) = result {
1066-
self.cell.unlink(&child);
1067-
} else {
1068-
tracing::debug!("received signal for unknown child pid {}", pid);
1069-
}
1062+
assert!(self.cell.get_child(pid).is_none());
10701063
},
10711064
}
10721065
}

0 commit comments

Comments
 (0)