From 0e1effcdcc213e745e5e90400095bc89859a3a9a Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 26 Nov 2024 22:08:55 -0800 Subject: [PATCH] libsysprof: ignore cancellable during IO parsing --- src/libsysprof/sysprof-cpu-usage.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libsysprof/sysprof-cpu-usage.c b/src/libsysprof/sysprof-cpu-usage.c index 229f9c8f..07db7cbf 100644 --- a/src/libsysprof/sysprof-cpu-usage.c +++ b/src/libsysprof/sysprof-cpu-usage.c @@ -236,10 +236,9 @@ sysprof_cpu_usage_record_fiber (gpointer user_data) } cpu_future = dex_aio_read (NULL, stat_fd, read_buffer, PROC_STAT_BUF_SIZE, 0); g_ptr_array_add (futures, dex_ref (cpu_future)); - if (!dex_await (dex_future_first (dex_ref (record->cancellable), - dex_future_allv ((DexFuture **)futures->pdata, futures->len), - NULL), - NULL)) + + /* Wait for all IO futures as they point at buffers owned by the array */ + if (!dex_await (dex_future_allv ((DexFuture **)futures->pdata, futures->len), NULL)) break; /* Now parse all the contents of the stat files which should be