mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 21:10:08 +01:00
Add nm_utils_invoke_on_timeout() beside nm_utils_invoke_on_idle().
They are fundamentally similar, except one schedules an idle handler
and the other a timeout.
Also, use the current g_main_context_get_thread_default() as context
instead of the singleton instance. That is a change in behavior, but
the only caller of nm_utils_invoke_on_idle() is the daemon, which
doesn't use different main contexts. Anyway, to avoid anybody being
tripped up by this also change the order of arguments. It anyway
seems nicer to first pass the cancellable, and the callback and user
data as last arguments. It's more in line with glib's asynchronous
methods.
Also, in the unlikely case that the cancellable is already cancelled
from the start, always schedule an idle action to complete fast.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| tests | ||
| meson.build | ||
| nm-bluez-common.h | ||
| nm-bluez-manager.c | ||
| nm-bluez-manager.h | ||
| nm-bluez5-dun.c | ||
| nm-bluez5-dun.h | ||
| nm-bt-error.c | ||
| nm-bt-error.h | ||
| nm-device-bt.c | ||
| nm-device-bt.h | ||