Add prefix to the name of the Thread the app is creating

This commit is contained in:
Benoit Marty 2022-08-19 10:07:34 +02:00
parent 0b1b228524
commit eeeb569ae0
5 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ internal abstract class RealmLiveEntityObserver<T : RealmObject>(protected val r
LiveEntityObserver, RealmChangeListener<RealmResults<T>> {
private companion object {
val BACKGROUND_HANDLER = createBackgroundHandler("LIVE_ENTITY_BACKGROUND")
val BACKGROUND_HANDLER = createBackgroundHandler("Matrix-LIVE_ENTITY_BACKGROUND")
}
protected val observerScope = CoroutineScope(SupervisorJob() + BACKGROUND_HANDLER.asCoroutineDispatcher())

View file

@ -40,7 +40,7 @@ internal object MatrixModule {
io = Dispatchers.IO,
computation = Dispatchers.Default,
main = Dispatchers.Main,
crypto = createBackgroundHandler("Crypto_Thread").asCoroutineDispatcher(),
crypto = createBackgroundHandler("Matrix-Crypto_Thread").asCoroutineDispatcher(),
dmVerif = Executors.newSingleThreadExecutor().asCoroutineDispatcher()
)
}

View file

@ -76,7 +76,7 @@ internal class DefaultTimeline(
) : Timeline {
companion object {
val BACKGROUND_HANDLER = createBackgroundHandler("DefaultTimeline_Thread")
val BACKGROUND_HANDLER = createBackgroundHandler("Matrix-DefaultTimeline_Thread")
}
override val timelineID = UUID.randomUUID().toString()

View file

@ -266,7 +266,7 @@ class VectorApplication :
}
private fun createFontThreadHandler(): Handler {
val handlerThread = HandlerThread("fonts")
val handlerThread = HandlerThread("Vector-fonts")
handlerThread.start()
return Handler(handlerThread.looper)
}

View file

@ -19,7 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.helper
import android.os.Handler
import android.os.HandlerThread
private const val THREAD_NAME = "Timeline_Building_Thread"
private const val THREAD_NAME = "Vector-Timeline_Building_Thread"
object TimelineAsyncHelper {