mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 19:01:08 +00:00
util: implement FusedStream for Jobs (#2031)
This commit is contained in:
@@ -674,6 +674,17 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<Spawner, Job> stream::FusedStream for Jobs<Spawner, Job>
|
||||||
|
where
|
||||||
|
Spawner: SpawnNamed,
|
||||||
|
Job: JobTrait,
|
||||||
|
{
|
||||||
|
fn is_terminated(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// A basic implementation of a subsystem.
|
/// A basic implementation of a subsystem.
|
||||||
///
|
///
|
||||||
/// This struct is responsible for handling message traffic between
|
/// This struct is responsible for handling message traffic between
|
||||||
@@ -762,7 +773,7 @@ where
|
|||||||
).await {
|
).await {
|
||||||
break
|
break
|
||||||
},
|
},
|
||||||
outgoing = jobs.next().fuse() => {
|
outgoing = jobs.next() => {
|
||||||
if let Err(e) = Self::handle_from_job(outgoing, &mut ctx).await {
|
if let Err(e) = Self::handle_from_job(outgoing, &mut ctx).await {
|
||||||
tracing::warn!(err = ?e, "failed to handle command from job");
|
tracing::warn!(err = ?e, "failed to handle command from job");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user