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



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))) { ... } })


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