[th/cloud-setup-utils-poll] move nmcs_utils_poll() helper to libnm-glib-aux

Closed Thomas Haller requested to merge th/cloud-setup-utils-poll into main

The idea is to have useful and correct helper functions, that are generic and reusable.

nmcs_utils_poll() was done with that intent, and it is a generally useful function. As the implementation shows, it's not entirely trivial to get all the parameters right, when it comes to glib-integration (GMainContext and GTask) and polling.

Whether something like a generic poll helper is a useful thing at all, may be a valid question. E.g. you need several hooks, and the usage is still not trivial. Regardless of that, "nm-cloud-setup-utils.c" already had such a helper. This is only about moving it to a place where it is actually accessible to others.

And, if it turns out to be a good idea after all, then somebody else could use it.

Merge request reports