Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19a39a35 authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Automerger Merge Worker
Browse files

Merge "Floss: Explicitly use topstack runtime to spawn cleanup tasks" into...

Merge "Floss: Explicitly use topstack runtime to spawn cleanup tasks" into main am: 5b8a4538 am: 5452fb8a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3215656



Change-Id: I3803955690b2f5900e89da5da01b623bb9e2ef14
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f8a99bdc 5452fb8a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ extern "C" fn handle_sigterm(_signum: i32) {
    if let Some((tx, notifier)) = guard.as_ref() {
        log::debug!("Handling SIGTERM by disabling the adapter!");
        let txl = tx.clone();
        tokio::spawn(async move {
        topstack::get_runtime().spawn(async move {
            // Send the shutdown message here.
            let _ = txl.send(Message::InterfaceShutdown).await;
        });
@@ -295,7 +295,7 @@ extern "C" fn handle_sigterm(_signum: i32) {

        log::debug!("SIGTERM cleaning up the stack.");
        let txl = tx.clone();
        tokio::spawn(async move {
        topstack::get_runtime().spawn(async move {
            // Clean up the profiles first as some of them might require main thread to clean up.
            let _ = txl.send(Message::CleanupProfiles).await;
            // Currently there is no good way to know when the profile is cleaned.