From 93255a25f08d4013be2fc14f839e750f9a9c2d81 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 18 Jul 2023 16:25:56 -0700 Subject: [PATCH] sysprof: make scheduler process until deadline elapsed We don't need to return to the mainloop until our deadline elapses, even if that source didn't finish processing. --- src/sysprof/sysprof-scheduler.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sysprof/sysprof-scheduler.c b/src/sysprof/sysprof-scheduler.c index 850853bc..26021548 100644 --- a/src/sysprof/sysprof-scheduler.c +++ b/src/sysprof/sysprof-scheduler.c @@ -40,7 +40,7 @@ #define _1_MSEC (G_USEC_PER_SEC / 1000L) -typedef struct +typedef struct _SysprofScheduler { GSource source; GQueue queue; @@ -48,7 +48,7 @@ typedef struct gsize last_handler_id; } SysprofScheduler; -typedef struct +typedef struct _SysprofTask { GList link; SysprofSchedulerCallback callback; @@ -77,8 +77,8 @@ sysprof_task_free (SysprofTask *task) static SysprofTask * sysprof_task_new (SysprofSchedulerCallback callback, - gpointer user_data, - GDestroyNotify notify) + gpointer user_data, + GDestroyNotify notify) { SysprofTask *task; @@ -163,7 +163,7 @@ sysprof_scheduler_dispatch (GSource *source, { task->ready_time = current + interval; g_queue_push_tail_link (&self->queue, &task->link); - break; + continue; } sysprof_task_free (task);