Skip to content

fix: replace deprecated glib::MainContext::channel with async_channel#215

Open
ptcodes wants to merge 2 commits intoCachyOS:developfrom
ptcodes:fix/async-channel-deprecation
Open

fix: replace deprecated glib::MainContext::channel with async_channel#215
ptcodes wants to merge 2 commits intoCachyOS:developfrom
ptcodes:fix/async-channel-deprecation

Conversation

@ptcodes
Copy link
Copy Markdown
Contributor

@ptcodes ptcodes commented Apr 4, 2026

The build was failing due to a couple of issues and I started looking into them. This pull request addresses the first of them on deprecation warnings on glib::MainContext::channel being treated as errors in CI.

The fix does the following:

  • Replaces all uses of the deprecated glib::MainContext::channel, glib::Sender and glib::Receiver with async_channel::unbounded() across actions.rs, cli_handler.rs, pages/mod.rs, pages/dns.rs and pages/tweaks.rs
  • Migrates receiver handlers from rx.attach() to glib::MainContext::default().spawn_local() with an async while let receive loop
  • Uses send_blocking() in background threads and try_send() in sync GTK main-thread callbacks.

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

Successfully merging this pull request may close these issues.

1 participant