NetworkManager/shared
Thomas Haller 9059b49002 shared: add nm_g_task_new() and nm_g_task_is_valid() helper
Note that we should always set the source-tag of our GTask.
This allows us to better assert that the user uses the right
_finish() method for the task.

The plain g_task_new() does not have a souce-tag argument. Hence, we would
always need to explicitly call g_task_set_source_tag().

Likewise, to check the source tag, we would always need to write

  g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
  g_return_val_if_fail (g_async_result_is_tagged (result, tag), FALSE);

Actually, g_async_result_is_tagged() uses the GAsyncResultIface to
call iface->is_tagged(). This has unnecessary overhead, so we should
just call g_task_get_source_tag() directly.

Add helper functions for that.
2019-10-16 08:56:00 +02:00
..
c-list shared/c-list: reimport 2019-04-14 17:22:04 +02:00
c-rbtree shared/c-rbtree: reimport 2019-04-14 17:23:01 +02:00
c-siphash shared/c-siphash: reimport 2019-04-14 17:23:25 +02:00
c-stdaux shared: patch c-stdaux.h to not include <stdatomic.h> 2019-04-14 17:17:52 +02:00
n-acd n-acd: fix leaking socket handle in n_acd_socket_new() when setsockopt() fails 2019-08-02 11:26:25 +02:00
n-dhcp4 n-dhcp4: arm timers in bound state 2019-09-18 09:29:51 +02:00
nm-glib-aux shared: add nm_g_task_new() and nm_g_task_is_valid() helper 2019-10-16 08:56:00 +02:00
nm-libnm-core-aux all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-libnm-core-intern all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-std-aux all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-udev-aux all: manually drop code comments with file description 2019-10-01 07:50:52 +02:00
nm-utils shared/tests: add tests for NMRefString 2019-10-16 08:53:39 +02:00
systemd all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
meson.build meson: Improve the libnm-core build file 2019-10-01 09:49:33 +02:00
nm-default.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-test-libnm-utils.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-test-utils-impl.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-version-macros.h.in all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00