Skip to content

Commit

Permalink
fixup! Implement separate signal and message flows (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexggh committed Jan 29, 2024
1 parent 5657448 commit abd02e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions orchestra/proc-macro/src/impl_subsystem_ctx_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,13 @@ pub(crate) fn impl_subsystem_context_trait_for(
}

async fn recv_signal(&mut self) -> ::std::result::Result<#signal, #error_ty> {
self.signals.next().await.ok_or(#support_crate ::OrchestraError::Context(
let result = self.signals.next().await.ok_or(#support_crate ::OrchestraError::Context(
"Signal channel is terminated and empty.".to_owned(),
).into())
).into());
if let Ok(_) = result {
self.signals_received.inc();
}
result
}

fn sender(&mut self) -> &mut Self::Sender {
Expand Down

0 comments on commit abd02e9

Please sign in to comment.