diff --git a/python/python-exec-service/src/com/intellij/python/community/execService/impl/processAwaiter.kt b/python/python-exec-service/src/com/intellij/python/community/execService/impl/processAwaiter.kt index 0a8c94d68ee8..286249017c1d 100644 --- a/python/python-exec-service/src/com/intellij/python/community/execService/impl/processAwaiter.kt +++ b/python/python-exec-service/src/com/intellij/python/community/execService/impl/processAwaiter.kt @@ -1,6 +1,7 @@ // Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.python.community.execService.impl +import com.intellij.openapi.diagnostic.fileLogger import com.intellij.platform.eel.provider.utils.EelProcessExecutionResult import com.intellij.python.community.execService.ProcessEvent import com.intellij.python.community.execService.ProcessEvent.OutputType @@ -12,11 +13,14 @@ import kotlinx.coroutines.async import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.flow.FlowCollector import kotlinx.coroutines.withContext +import org.jetbrains.annotations.ApiStatus +import java.io.IOException /** * Awaits of process result and reports its stdout/stderr as a progress. */ -internal suspend fun Process.awaitWithReporting(progressListener: FlowCollector?): EelProcessExecutionResult = +@ApiStatus.Internal +suspend fun Process.awaitWithReporting(progressListener: FlowCollector?): EelProcessExecutionResult = coroutineScope { val stdout = async { report(STDOUT, progressListener) } val stderr = async { report(STDERR, progressListener) } @@ -36,7 +40,13 @@ private suspend fun Process.report(outputType: OutputType, to: FlowCollector