Skip to content

Commit

Permalink
perf(wm): increase channel bounds 5 -> 20
Browse files Browse the repository at this point in the history
This commit increases various channel bounds from 5 to 20 since it was
discovered that this reduction had no impact on #862, and some
crashes/freezes have been noted due to the channel bounds of 5 being too
low.
  • Loading branch information
LGUG2Z committed Jun 12, 2024
1 parent 3d518f7 commit c022438
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion komorebi/src/border_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct Notification;
static CHANNEL: OnceLock<(Sender<Notification>, Receiver<Notification>)> = OnceLock::new();

pub fn channel() -> &'static (Sender<Notification>, Receiver<Notification>) {
CHANNEL.get_or_init(|| crossbeam_channel::bounded(5))
CHANNEL.get_or_init(|| crossbeam_channel::bounded(20))
}

pub fn event_tx() -> Sender<Notification> {
Expand Down
2 changes: 1 addition & 1 deletion komorebi/src/stackbar_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct Notification;
static CHANNEL: OnceLock<(Sender<Notification>, Receiver<Notification>)> = OnceLock::new();

pub fn channel() -> &'static (Sender<Notification>, Receiver<Notification>) {
CHANNEL.get_or_init(|| crossbeam_channel::bounded(5))
CHANNEL.get_or_init(|| crossbeam_channel::bounded(20))
}

pub fn event_tx() -> Sender<Notification> {
Expand Down
2 changes: 1 addition & 1 deletion komorebi/src/transparency_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn known_hwnds() -> Vec<isize> {
}

pub fn channel() -> &'static (Sender<Notification>, Receiver<Notification>) {
CHANNEL.get_or_init(|| crossbeam_channel::bounded(5))
CHANNEL.get_or_init(|| crossbeam_channel::bounded(20))
}

pub fn event_tx() -> Sender<Notification> {
Expand Down
2 changes: 1 addition & 1 deletion komorebi/src/winevent_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn start() {
}

fn channel() -> &'static (Sender<WindowManagerEvent>, Receiver<WindowManagerEvent>) {
CHANNEL.get_or_init(|| crossbeam_channel::bounded(5))
CHANNEL.get_or_init(|| crossbeam_channel::bounded(20))
}

pub fn event_tx() -> Sender<WindowManagerEvent> {
Expand Down

0 comments on commit c022438

Please sign in to comment.