- /** File descriptor that can be used with poll/select to
- * detect when wakeup() has been called on this channel.
- * It be marked as readable/input-ready when this condition
- * is true. It has already been marked non-blocking.
- */
- int selectable() const { return fds[0]; }
-
- /* glibmm 2.22 and earlier has a terrifying bug that will
- cause crashes whenever a Source is removed from
- a MainContext (including the destruction of the MainContext),
- because the Source is destroyed "out from under the nose of"
- the RefPtr. I (Paul) have fixed this (https://bugzilla.gnome.org/show_bug.cgi?id=561885)
- but in the meantime, we need a hack to get around the issue.
- */
- Glib::RefPtr<Glib::IOSource> ios();
- void drop_ios ();
-
- /** returns true if the CrossThreadChannel was
- * correctly constructed.
- */
- bool ok() const { return fds[0] >= 0 && fds[1] >= 0; }
+ void set_receive_handler (sigc::slot<bool,Glib::IOCondition> s);
+ void attach (Glib::RefPtr<Glib::MainContext>);