Hello,

`Glib::Dispatcher` has syntax similar to a void signal, but there are cases
where it would be convenient to pass information between threads using the
same syntax. Obviously returning anything would be impossible, but is there
a technical reason not to have one way communication (e.g.
`Glib::Dispatcher<int>` that can be used a little like a
`sigc::signal<void(int)>`)? Obviously the user would have to be especially
careful about scope (don't pass references to things that might be deleted
before the other thread can act on the signal). In some cases it might also
make sense to pass a mutex alongside the value.

Is this functionality not provided as part of libsigc++ just because it's
unsafe-by-default, or is there a deeper problem? According to this old
thread <https://mail.gnome.org/archives/gtkmm-list/2007-March/msg00063.html>,
libsigcX <https://sourceforge.net/projects/libsigcx/> provides something
similar, but it looks like it hasn't been updated in a very long time.

If there's not an obvious issue that makes it impossible, I'll probably
write myself a wrapper class that gives me this kind of behavior.

Cheers,

Jackson
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to