Re: C++11: Deprecate Glib::Threads



A related generic question:  would a C++ based implementation of dispatcher be more efficient than the glib (C) based ones?

On Sat, Aug 29, 2015 at 1:37 PM, Andrew Potter <agpotter gmail com> wrote:
On Wed, Aug 26, 2015 at 1:20 PM, Murray Cumming <murrayc murrayc com> wrote:
> I'm starting to learn about the new concurrency APIs in C++11. I wonder
> if we could soon deprecate Glib::Threads, which wraps the glib threads
> API. Thoughts?
> https://developer.gnome.org/glibmm/stable/group__Threads.html

Keep in mind Reader/Writer locks are only in C++14; do the current
major distros stable versions have a GCC new enough that users could
update their code to avoid the depreciation warning?

> Maybe we'd want to reimplement Glib::Dispatcher, which has no
> corresponding API in glib, using C++11 concurrency APIs instead of
> Glib::Threads.

I'd be interesting in seeing what a Dispatcher API with promise/future
etc would look like, but I don't think there is anything that would
replace the pipe mechanism to signal the GMainLoop; so rather than
reimplementing it you might just be adding some new methods? Or am I
missing something? I doubt you mean to add an idle handler to
std::for_each(begin(futures_list), end(futures_list), [](auto&
future){ if (future_status::ready ==
future.wait_for(duration::seconds(0))) { ... } })
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



--
Andy Tai, atai atai org, Skype: licheng.tai
Year 2015 民國104年
自動的精神力是信仰與覺悟
自動的行為力是勞動與技能


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]