PlatformThreadContextElement


public abstract class PlatformThreadContextElement<S extends Object> extends AbstractCoroutineContextElement implements PropagationToken


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

Summary

Public methods

close

public abstract void close()

contextElementOrNull

@DelicateTracingApi
public CoroutineContext.Element contextElementOrNull()
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.

getCategory

Added in 2.0.0-alpha01
public @NonNull String getCategory()

getFlowIds

Added in 2.0.0-alpha01
public @NonNull List<@NonNull LonggetFlowIds()

getName

Added in 2.0.0-alpha01
public @NonNull String getName()

setCategory

Added in 2.0.0-alpha01
public void setCategory(@NonNull String category)

setName

Added in 2.0.0-alpha01
public void setName(@NonNull String name)