current_process_index
Retrieves the index of the current process and adds a base offset, returning None if the process index is not available.
def current_process_index(
base: integer = 1
) - > integer or null
Retrieves the index of the current process, typically used in multiprocessing contexts to identify specific worker instances.
Parameters
| Name | Type | Description |
|---|---|---|
| base | integer = 1 | The starting value added to the process index, commonly used to switch between 0-based and 1-based indexing. |
Returns
| Type | Description |
|---|---|
integer or null | The process index offset by the base value, or null if the current process does not have an index attribute assigned. |