kqueue: Use the worker context to schedule rescanning of missing files

This makes it consistent with the file monitor itself, which already
attaches kqueue event sources to the worker context.
This commit is contained in:
Ting-Wei Lan 2018-06-17 09:48:34 +08:00
parent 454a9f8de9
commit e714e1e951

View File

@ -66,8 +66,12 @@ _km_add_missing (kqueue_sub *sub)
if (!scan_missing_running)
{
GSource *source;
scan_missing_running = TRUE;
g_timeout_add_seconds (SCAN_MISSING_TIME, km_scan_missing, NULL);
source = g_timeout_source_new_seconds (SCAN_MISSING_TIME);
g_source_set_callback (source, _km_scan_missing_cb, NULL, NULL);
g_source_attach (source, GLIB_PRIVATE_CALL (g_get_worker_context) ());
g_source_unref (source);
}
}