Skip to content

Commit a620576

Browse files
committed
Remove a usage of select
1 parent 87a7451 commit a620576

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2842,14 +2842,9 @@ fn spawn_io_queue(stdin: ChildStdin, stdout: ChildStdout, token: CancellationTok
28422842
let handle = tokio::runtime::Handle::current();
28432843

28442844
loop {
2845-
let coordinator_msg = handle.block_on(async {
2846-
select! {
2847-
() = token.cancelled() => None,
2848-
msg = rx.recv() => msg,
2849-
}
2850-
});
2845+
let coordinator_msg = handle.block_on(token.run_until_cancelled(rx.recv()));
28512846

2852-
let Some(coordinator_msg) = coordinator_msg else {
2847+
let Some(Some(coordinator_msg)) = coordinator_msg else {
28532848
break;
28542849
};
28552850

0 commit comments

Comments
 (0)