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:
parent
acc639f5e7
commit
72a75eabc7
10 changed files with 32 additions and 34 deletions
|
|
@ -7,8 +7,8 @@ use cosmic::iced::wayland::actions::window::SctkWindowSettings;
|
|||
use cosmic::iced::wayland::{window::resize_window, InitialSurface, SurfaceIdWrapper};
|
||||
use cosmic::iced::widget::{column, container, row, text};
|
||||
use cosmic::iced::{
|
||||
executor, subscription, widget::button, window, Application, Command, Event::Mouse, Length,
|
||||
Settings, Subscription,
|
||||
subscription, widget::button, window, Application, Command, Event::Mouse, Length, Settings,
|
||||
Subscription,
|
||||
};
|
||||
use cosmic::iced_style::application::{self, Appearance};
|
||||
use cosmic::iced_style::Color;
|
||||
|
|
@ -60,7 +60,7 @@ enum Message {
|
|||
impl Application for IcedWorkspacesApplet {
|
||||
type Message = Message;
|
||||
type Theme = Theme;
|
||||
type Executor = executor::Default;
|
||||
type Executor = cosmic::SingleThreadExecutor;
|
||||
type Flags = ();
|
||||
|
||||
fn new(_flags: ()) -> (Self, Command<Message>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue