Skip to content

Commit

Permalink
fixup! Implement separate signal and message flows (#66) (#71)
Browse files Browse the repository at this point in the history
* fixup! Implement separate signal and message flows (#66)

* Address review feedback

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh authored Jan 29, 2024
1 parent 5657448 commit c0ded02
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 result.is_ok() {
self.signals_received.inc();
}
result
}

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

0 comments on commit c0ded02

Please sign in to comment.