Process.WaitForExitAsync(CancellationToken) Método

Definición

Indica al componente de proceso que espere a que se cierre el proceso asociado o que se cancele cancellationToken.Instructs the process component to wait for the associated process to exit, or for the cancellationToken to be cancelled.

public System.Threading.Tasks.Task WaitForExitAsync (System.Threading.CancellationToken cancellationToken = default);
member this.WaitForExitAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function WaitForExitAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

Parámetros

cancellationToken
CancellationToken

Token opcional para cancelar la operación asincrónica.An optional token to cancel the asynchronous operation.

Devoluciones

Task

Tarea que se completará cuando el proceso se haya cerrado, se haya solicitado la cancelación o se produzca un error.A task that will complete when the process has exited, cancellation has been requested, or an error occurs.

Comentarios

Al llamar a este método, se establecerá EnableRaisingEvents en true .Calling this method will set EnableRaisingEvents to true.

Se aplica a