apply_target
Wraps the base apply_target function to execute a target callable with specified arguments, keyword arguments, and optional callbacks while providing the current process ID.
def apply_target(
target: callable,
args: tuple,
kwargs: dict,
callback: callable,
accept_callback: callable,
getpid: callable
) - > Any
Executes a target function with provided arguments and handles lifecycle callbacks within the execution context.
Parameters
| Name | Type | Description |
|---|---|---|
| target | callable | The function or task to be executed. |
| args | tuple | Positional arguments to pass to the target function. |
| kwargs | dict | Keyword arguments to pass to the target function. |
| callback | callable | A function to be executed upon successful completion of the target. |
| accept_callback | callable | A function to be executed when the target is accepted for processing. |
| getpid | callable | A function that returns the process identifier for the current execution context. |
Returns
| Type | Description |
|---|---|
Any | The result of the underlying base target application logic. |