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

@ -19,7 +19,7 @@ use cosmic::iced::wayland::popup::get_popup;
use cosmic::iced::wayland::SurfaceIdWrapper;
use cosmic::iced::widget::mouse_listener;
use cosmic::iced::widget::{column, row};
use cosmic::iced::{executor, window, Application, Command, Subscription};
use cosmic::iced::{window, Application, Command, Subscription};
use cosmic::iced_native::alignment::Horizontal;
use cosmic::iced_native::subscription::events_with;
use cosmic::iced_native::widget::vertical_space;
@ -162,7 +162,7 @@ fn desktop_info_for_app_ids(mut app_ids: Vec<String>) -> Vec<DesktopInfo> {
impl Application for CosmicAppList {
type Message = Message;
type Theme = Theme;
type Executor = executor::Default;
type Executor = cosmic::SingleThreadExecutor;
type Flags = ();
fn new(_flags: ()) -> (Self, Command<Message>) {