Add typed APIs for associative data for DexFuture
I've read your blog post, from the outside it looks an impressive work (although not finalized).
I wanted to give a short feedback on the use of GTask:
With a GTask we need to attach data, and it's done with gpointers (void*
), so the developer needs to be careful when getting back the data. There is also downcast of the GObject. More specifically, I'm thinking of:
g_task_get_source_object()
g_task_get_task_data()
I know gpointers are used throughout GLib, e.g. GHashTable or GList. But I think going forward, trying to avoid gpointers and downcasting would be a good thing.
That's all for my feedback, I haven't looked if Dex is better in that regard.
(I've filed this as an issue, but it's more a general comment, for an API design point of view ;-)