Use cosmic::SingleThreadExecutor

This cuts down the number of threads per applet process. This is probably
no benefit to having multiple tokio worker threads for a typical applet.
This commit is contained in:
Ian Douglas Scott 2023-01-18 16:51:30 -08:00 committed by Ashley Wulber
parent acc639f5e7
commit 72a75eabc7
10 changed files with 32 additions and 34 deletions

View file

@ -9,7 +9,7 @@ use cosmic::widget::{button, icon};
use cosmic::Renderer;
use cosmic::iced::{
self, executor,
self,
widget::{column, horizontal_rule, row, slider, text, toggler},
window, Alignment, Application, Command, Length, Subscription,
};
@ -69,7 +69,7 @@ enum Message {
impl Application for Audio {
type Message = Message;
type Theme = Theme;
type Executor = executor::Default;
type Executor = cosmic::SingleThreadExecutor;
type Flags = ();
fn new(_flags: ()) -> (Audio, Command<Message>) {