From fc19bf8e5bf1d829464cc7bfbdc96238062b75d2 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 21 Oct 2022 17:13:22 +0200 Subject: [PATCH] Realm-kotlin: add name to timeline coroutine scope --- .../sdk/internal/session/room/timeline/DefaultTimeline.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt index 2657b5b59e..19d993e62c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/DefaultTimeline.kt @@ -17,6 +17,7 @@ package org.matrix.android.sdk.internal.session.room.timeline import kotlinx.coroutines.CancellationException +import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.SupervisorJob @@ -86,7 +87,7 @@ internal class DefaultTimeline( private val backwardState = AtomicReference(Timeline.PaginationState()) private val timelineDispatcher = BACKGROUND_HANDLER.asCoroutineDispatcher() - private val timelineScope = CoroutineScope(sessionCoroutineScope.coroutineContext + SupervisorJob() + timelineDispatcher) + private val timelineScope = CoroutineScope(sessionCoroutineScope.coroutineContext + SupervisorJob() + timelineDispatcher + CoroutineName("Timeline")) private val sequencer = SemaphoreCoroutineSequencer() private val postSnapshotSignalFlow = MutableSharedFlow(0)