mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
make more subsystems blocking, fix blocking subsystem spawning (#5133)
* make more subsystems blocking * actually spawn blocking subsystems on their own threads
This commit is contained in:
committed by
GitHub
parent
2ead4ce12d
commit
5904ae418e
@@ -594,7 +594,7 @@ pub(crate) fn impl_task_kind(info: &OverseerInfo) -> proc_macro2::TokenStream {
|
||||
struct Blocking;
|
||||
impl TaskKind for Blocking {
|
||||
fn launch_task<S: SpawnNamed>(spawner: &mut S, task_name: &'static str, subsystem_name: &'static str, future: BoxFuture<'static, ()>) {
|
||||
spawner.spawn(task_name, Some(subsystem_name), future)
|
||||
spawner.spawn_blocking(task_name, Some(subsystem_name), future)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -462,19 +462,19 @@ pub struct Overseer<SupportsParachains> {
|
||||
#[subsystem(ApprovalDistributionMessage)]
|
||||
approval_distribution: ApprovalDistribution,
|
||||
|
||||
#[subsystem(no_dispatch, ApprovalVotingMessage)]
|
||||
#[subsystem(no_dispatch, blocking, ApprovalVotingMessage)]
|
||||
approval_voting: ApprovalVoting,
|
||||
|
||||
#[subsystem(GossipSupportMessage)]
|
||||
gossip_support: GossipSupport,
|
||||
|
||||
#[subsystem(no_dispatch, DisputeCoordinatorMessage)]
|
||||
#[subsystem(no_dispatch, blocking, DisputeCoordinatorMessage)]
|
||||
dispute_coordinator: DisputeCoordinator,
|
||||
|
||||
#[subsystem(no_dispatch, DisputeDistributionMessage)]
|
||||
dispute_distribution: DisputeDistribution,
|
||||
|
||||
#[subsystem(no_dispatch, ChainSelectionMessage)]
|
||||
#[subsystem(no_dispatch, blocking, ChainSelectionMessage)]
|
||||
chain_selection: ChainSelection,
|
||||
|
||||
/// External listeners waiting for a hash to be in the active-leave set.
|
||||
|
||||
Reference in New Issue
Block a user