apply_target
Apply function within pool context.
def apply_target(
target: callable,
args: tuple,
kwargs: dict,
callback: callable,
accept_callback: callable,
pid: int,
getpid: callable,
propagate: tuple,
monotonic: callable
) - > null
Apply function within pool context.
Parameters
| Name | Type | Description |
|---|---|---|
| target | callable | The function to be executed within the pool context. |
| args | tuple | Positional arguments to pass to the target function. |
| kwargs | dict | Keyword arguments to pass to the target function. |
| callback | callable | Function invoked with the return value of the target function upon successful execution. |
| accept_callback | callable | Optional callback triggered when the task is accepted, receiving the process ID and a monotonic timestamp. |
| pid | int | The process identifier to report; defaults to the current process ID if not provided. |
| getpid | callable | Function used to retrieve the current process ID. |
| propagate | tuple | A tuple of exception classes that should be allowed to propagate upward without being wrapped or handled. |
| monotonic | callable | Function used to retrieve a monotonic clock timestamp for timing and synchronization. |
Returns
| Type | Description |
|---|---|
null | This function does not return a value; results are passed to the provided callback function. |