mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rd][debugger] IJPL-177087 FrontendXDebuggerSession: Handle flows cancellation
GitOrigin-RevId: c7d3efa2a380dd73cdd23ac6854eb1c9e582a2fc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2f8dad09fb
commit
3db6c38939
+10
-12
@@ -90,16 +90,10 @@ internal class FrontendXDebuggerSession private constructor(
|
||||
send(null)
|
||||
return@collectLatest
|
||||
}
|
||||
val childScope = cs.childScope(
|
||||
"Suspend Context ${suspendContextDto.id}"
|
||||
)
|
||||
try {
|
||||
send(FrontendXSuspendContext(suspendContextDto, childScope))
|
||||
supervisorScope {
|
||||
send(FrontendXSuspendContext(suspendContextDto, this))
|
||||
awaitCancellation()
|
||||
}
|
||||
finally {
|
||||
childScope.cancel()
|
||||
}
|
||||
}
|
||||
}.stateIn(cs, SharingStarted.Eagerly, null)
|
||||
|
||||
@@ -110,8 +104,10 @@ internal class FrontendXDebuggerSession private constructor(
|
||||
send(null)
|
||||
return@collectLatest
|
||||
}
|
||||
// TODO[IJPL-177087] narrower scope?
|
||||
send(FrontendXExecutionStack(executionStackDto, cs))
|
||||
supervisorScope {
|
||||
send(FrontendXExecutionStack(executionStackDto, this))
|
||||
awaitCancellation()
|
||||
}
|
||||
}
|
||||
}.stateIn(cs, SharingStarted.Eagerly, null)
|
||||
|
||||
@@ -122,8 +118,10 @@ internal class FrontendXDebuggerSession private constructor(
|
||||
send(null)
|
||||
return@collectLatest
|
||||
}
|
||||
return@collectLatest
|
||||
send(FrontendXStackFrame(stackFrameDto))
|
||||
supervisorScope {
|
||||
send(FrontendXStackFrame(stackFrameDto))
|
||||
awaitCancellation()
|
||||
}
|
||||
}
|
||||
}.stateIn(cs, SharingStarted.Eagerly, null)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user