We currently don't have anything like that, do you have an example on
how this works with gtkmm and/or gtk-rs?
I shall ignore C++ and hence gtkmm. :-)
In gtk-rs master (not yet released) the GTK event loop can process standard futures and channels of futures. There is a for_each function on channels of futures that does asynchronous processing of received futures on the channel.
let context = glib::MainContext::ref_thread_default();
context.spawn_local({
let c_w = control_window.clone();
message_channel.for_each(move |message| {
match message {
Message::FrontendAppeared { fei } => add_frontend(&c_w, fei.clone()),
Message::FrontendDisappeared { fei } => remove_frontend(&c_w, fei.clone()),
}
Ok(())
}).map(|_| ())
});
This "reactive" way of processing events works so well.
https://github.com/Me-TV/Me-TV
The above code is in src/control_windows.rs.