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
|
|
@ -15,7 +15,6 @@ use cosmic::iced::alignment::Horizontal;
|
|||
use cosmic::iced::wayland::popup::{destroy_popup, get_popup};
|
||||
use cosmic::iced::wayland::SurfaceIdWrapper;
|
||||
use cosmic::iced::{
|
||||
executor,
|
||||
widget::{column, container, row, slider, text},
|
||||
window, Alignment, Application, Command, Length, Subscription,
|
||||
};
|
||||
|
|
@ -94,7 +93,7 @@ enum Message {
|
|||
impl Application for CosmicBatteryApplet {
|
||||
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