[Overview][Classes][Procedures and functions][Index] | Reference for unit 'AsyncProcess' (#lcl)

# TAsyncProcess.Execute

Executes the process.

## Declaration

Source position: asyncprocess.pp line 48

`public procedure TAsyncProcess.Execute; override;`

## Description

Execute is an overridden procedure used to execute the process. Execute calls the inherited Execute method on entry.

Execute uses values in Options to determine if a process or a pipe handler is needed for the class instance. When Options includes the value poUsePipes, AddPipeEventHandler is called using HandlePipeInput as the pipe handler routine. Set the values in Options prior to calling the Execute method.

Execute calls AddProcessEventHandler using HandleProcessTermination as the process handler routine.

## See also

TAsyncProcess.HandlePipeInput |  | Implements asynchronous notifications during execution of the process.
TAsyncProcess.HandleProcessTermination |  | Performs actions needed when the process is terminated.
TProcess.Options