Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple instance? #15

Closed
ogios opened this issue Jan 31, 2025 · 3 comments
Closed

Multiple instance? #15

ogios opened this issue Jan 31, 2025 · 3 comments

Comments

@ogios
Copy link
Contributor

ogios commented Jan 31, 2025

i see this after i reload my widgets, which calls client.items()
this is weird...

i do call nm-applet and xwaylandvideobridge a lot of times to test, but i've killed the process after the test and this does not happen before i reload my widgets.

Image

@JakeStanger
Copy link
Owner

Likely related to this issue in Ironbar: JakeStanger/ironbar#854

I suspect something to do with reloading is causing items to be re-fetched without being correctly dropped first.

@ogios
Copy link
Contributor Author

ogios commented Feb 5, 2025

maybe we can let user to maintain the item themselves, it saves memory if user has to process the data after an event.

make item a feature, user can still use it when adding data in features?

/// Client for watching the tray.
#[derive(Debug)]
pub struct Client {
    tx: broadcast::Sender<Event>,
    _rx: broadcast::Receiver<Event>,
    connection: Connection,

    #[cfg(feature = "data")]
    items: Arc<Mutex<State>>,
}

@JakeStanger
Copy link
Owner

JakeStanger commented Feb 5, 2025

I am assuming that #17 fixes this. If it doesn't, let me know and I can re-open.

We could potentially put the internal items map behind a feature flag to reduce memory, I'd be happy for that to be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants