Skip to content

Commit

Permalink
Add minor 'usage notes'
Browse files Browse the repository at this point in the history
  • Loading branch information
sellmair committed Oct 23, 2024
1 parent c61d914 commit 4527b1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ internal const val SUSPENDED = "SUSPENDED"
/**
* Internal implementation class where debugger tracks details it knows about each coroutine.
* Its mutable fields can be updated concurrently, thus marked with `@Volatile`
*
* Usage Note: IntelliJ/Coroutines Debugger: Reflection
*/
@PublishedApi
internal class DebugCoroutineInfoImpl internal constructor(
Expand Down
12 changes: 12 additions & 0 deletions kotlinx-coroutines-core/jvm/src/debug/internal/DebugProbesImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ import kotlin.coroutines.jvm.internal.CoroutineStackFrame
import kotlin.synchronized
import _COROUTINE.ArtificialStackFrames

/**
* Usage Note: IntelliJ @SuppressWarnings({"KotlinInternalInJava"}): CoroutineDumpState
* call to 'install'
*
* Usage Note: IntelliJ @SuppressWarnings({"KotlinInternalInJava"}): DebugProbesKt
* Custom 'DebugProbesKt' class providing 'probeCoroutineCreated', 'probeCoroutineResumed', 'probeCoroutineSuspended'
* calling into DebugProbesImpl (similar to our DebugProbesKt)
*
* Usage Note: IntelliJ/Coroutines Debugger: Reflection
*/
@PublishedApi
internal object DebugProbesImpl {
private val ARTIFICIAL_FRAME = ArtificialStackFrames().coroutineCreation()
Expand Down Expand Up @@ -527,6 +537,8 @@ internal object DebugProbesImpl {
/**
* This class is injected as completion of all continuations in [probeCoroutineCompleted].
* It is owning the coroutine info and responsible for managing all its external info related to debug agent.
*
* Usage Note: IntelliJ/Coroutines Debugger: Reflection
*/
public class CoroutineOwner<T> internal constructor(
@JvmField internal val delegate: Continuation<T>,
Expand Down

0 comments on commit 4527b1f

Please sign in to comment.