mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
[debugger] Thread Dump fixes
* better handle errors in case of dumping on the breakpoint (cherry picked from commit bcae96acbdfea3f6a6046683edd57724e41fda92) IJ-CR-167309 GitOrigin-RevId: 2438988f7ebedf23b0f8620b79bfddaa7b5b5ccf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5af4845b0
commit
e52eacf97e
@@ -40,15 +40,15 @@ internal suspend fun <R> suspendAllAndEvaluate(
|
||||
tryToBreakOnAnyMethodAndEvaluate(context, process, null, timeToSuspend, action)
|
||||
} else {
|
||||
// We are on a Suspend All breakpoint, we can evaluate right here.
|
||||
val result = Channel<R>(capacity = 1)
|
||||
val result = CompletableDeferred<R>()
|
||||
|
||||
// We have to evaluate inside SuspendContextCommandImpl, so we just start a new command.
|
||||
// TODO: are there any better ways to do this? Should we create proper command above?
|
||||
executeOnDMT(suspendContext) {
|
||||
result.send(action(suspendContext))
|
||||
result.completeWith(runCatching { action(suspendContext) })
|
||||
}
|
||||
|
||||
result.receive()
|
||||
result.await()
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user