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 11, 2022
1 parent 7ed206c commit 3f8a945
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ pub(crate) struct MainLoop {
pub(crate) initial_volume: Option<u16>,
pub(crate) shell: String,
pub(crate) device_type: DeviceType,
// Command line option should still be available without dbus_mpris feature
#[cfg_attr(not(feature = "dbus_mpris"), allow(dead_code))]
#[cfg_attr(not(feature = "dbus_mpris"), allow(unused))]
pub(crate) use_mpris: bool,
pub(crate) credentials_provider: CredentialsProvider,
}
Expand All @@ -96,7 +95,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 @@ -140,7 +141,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 3f8a945

Please sign in to comment.