Skip to content

Commit

Permalink
use stack pinning in some cases
Browse files Browse the repository at this point in the history
Co-authored-by: Robin van Dijk <robin@robinjint.nl>
  • Loading branch information
eladyn and robinvd committed Mar 2, 2022
1 parent eb9eaff commit 71fdfb9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub(crate) struct MainLoop {
pub(crate) initial_volume: Option<u16>,
pub(crate) shell: String,
pub(crate) device_type: DeviceType,
#[allow(unused)]
#[cfg_attr(not(feature = "dbus_mpris"), allow(unused))]
pub(crate) use_mpris: bool,
pub(crate) credentials_provider: CredentialsProvider,
}
Expand All @@ -94,7 +94,9 @@ impl MainLoop {
}

pub(crate) async fn run(&mut self) {
let mut ctrl_c = Box::pin(tokio::signal::ctrl_c());
tokio::pin! {
let ctrl_c = tokio::signal::ctrl_c();
}

'mainloop: loop {
let session = tokio::select!(
Expand Down Expand Up @@ -138,7 +140,7 @@ impl MainLoop {
mixer,
);

let mut spirc_task = Box::pin(spirc_task);
tokio::pin!(spirc_task);

let shared_spirc = Arc::new(spirc);

Expand Down

0 comments on commit 71fdfb9

Please sign in to comment.