mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[debugger] Mark final method in SuspendContextCommandImpl
GitOrigin-RevId: d075ae3a21081335f37f20f5035cb83f645d48a7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3e6d4fdcb6
commit
2522f73fbb
@@ -47,6 +47,7 @@ abstract class DebuggerCommandImpl(private val myPriority: PrioritizedTask.Prior
|
||||
|
||||
override fun getPriority() = myPriority
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun notifyCancelled() {
|
||||
try {
|
||||
commandCancelled()
|
||||
@@ -72,9 +73,11 @@ abstract class DebuggerCommandImpl(private val myPriority: PrioritizedTask.Prior
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
protected open fun onSuspendOrFinish() {
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
protected open fun invokeContinuation() {
|
||||
executeContinuation()
|
||||
}
|
||||
@@ -88,6 +91,8 @@ abstract class DebuggerCommandImpl(private val myPriority: PrioritizedTask.Prior
|
||||
}
|
||||
|
||||
internal fun resetContinuation(runnable: Runnable?): Runnable? = continuation.getAndSet(runnable)
|
||||
|
||||
@ApiStatus.Internal
|
||||
protected fun executeContinuation() {
|
||||
resetContinuation(null)?.run()
|
||||
}
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ abstract class SuspendContextCommandImpl protected constructor(open val suspendC
|
||||
@ApiStatus.Experimental
|
||||
open suspend fun contextActionSuspend(suspendContext: SuspendContextImpl) = contextAction(suspendContext)
|
||||
|
||||
override suspend fun actionSuspend() {
|
||||
final override suspend fun actionSuspend() {
|
||||
if (LOG.isDebugEnabled) {
|
||||
LOG.debug("trying $this")
|
||||
}
|
||||
@@ -45,7 +45,7 @@ abstract class SuspendContextCommandImpl protected constructor(open val suspendC
|
||||
check(resetContinuation(null) == null) { "Continuation is not null after resume" }
|
||||
}
|
||||
|
||||
override fun invokeContinuation() = invokeWithChecks {
|
||||
final override fun invokeContinuation() = invokeWithChecks {
|
||||
executeContinuation()
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ abstract class SuspendContextCommandImpl protected constructor(open val suspendC
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSuspendOrFinish() {
|
||||
final override fun onSuspendOrFinish() {
|
||||
if (mySuspendContextSetInProgress) {
|
||||
suspendContext?.myInProgress = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user