ApplyResult
This class provides a wrapper around a future object to manage the results of asynchronous operations. It allows users to retrieve results via a get method and provides a mechanism to block execution until the operation completes or a timeout is reached.
Attributes
| Attribute | Type | Description |
|---|---|---|
| f | Future | The underlying Future object that tracks the execution and state of the asynchronous operation. |
| get | Callable | A reference to the future's result method used to retrieve the outcome or raise exceptions from the completed task. |
Constructor
Signature
def ApplyResult(
future: Future
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| future | Future | The future object representing the asynchronous result. |
Signature
def ApplyResult(
future: Future
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| future | Future | The concurrent.futures.Future object representing the asynchronous operation to be tracked |
Methods
wait()
@classmethod
def wait(
timeout: float | None = None
) - > null
Blocks the current thread until the asynchronous operation completes or the specified timeout is reached.
Parameters
| Name | Type | Description |
|---|---|---|
| timeout | `float | None` = None |
Returns
| Type | Description |
|---|---|
null | None |