You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I'm new to GStreamer, it took a while for me to understand that MainLoop is actually the glib main loop, the same one that is called by gtk-rs. It's clear when you read the code though. My project had both MainLoop::spawn() and gtk::main() and then all kinds of weird intermittent errors occurred. Something it's not expected when you are writing Rust code.
What could we do to avoid this kind of problem?
Add dependency on glib (which one) and somehow detect duplicate loop
Add code to check main loop is already running
Proper documentation
The text was updated successfully, but these errors were encountered:
GLib allows multiple mainloops with different main contexts. The only clean solution here would be to depend on glib, and this crate seems to be the one that is most actively developed: https://docs.rs/glib/0.1.2/glib/
Since I'm new to GStreamer, it took a while for me to understand that MainLoop is actually the glib main loop, the same one that is called by gtk-rs. It's clear when you read the code though. My project had both MainLoop::spawn() and gtk::main() and then all kinds of weird intermittent errors occurred. Something it's not expected when you are writing Rust code.
What could we do to avoid this kind of problem?
The text was updated successfully, but these errors were encountered: