PlatformThreadContextElement



We use the PlatformThreadContextElement construct to know when a coroutine has suspended, and about to resume on a Thread.

Summary

Public functions

open Unit
android
open CoroutineContext.Element?
android

Public properties

open String

The category that a trace section belongs to.

android
open List<Long>

The underlying Perfetto flow ids that can be used to determine the causality for a given trace section.

android
open String

The name of the code section as it appears in a trace.

android

Inherited functions

From kotlin.coroutines.CoroutineContext
open operator CoroutineContext
android
From kotlin.coroutines.CoroutineContext.Element
open R
<R : Any?> fold(initial: R, operation: (CoroutineContext.Element, R) -> R)
android
open operator E?
android
open CoroutineContext
android

Public functions

close

open fun close(): Unit

contextElementOrNull

@DelicateTracingApi
open fun contextElementOrNull(): CoroutineContext.Element?
Returns
CoroutineContext.Element?

a CoroutineContext.Element that needs to be installed in the kotlinx.coroutines.currentCoroutineContext prior to dispatching the suspending block of code being traced; if the token is being used in a suspending context.

Public properties

category

open var categoryString

The category that a trace section belongs to.

flowIds

open val flowIdsList<Long>

The underlying Perfetto flow ids that can be used to determine the causality for a given trace section.

name

open var nameString

The name of the code section as it appears in a trace.