exec π
Exec operations.
ExecMixin π
Mixin providing the Exec operations for a Session
.
This mixin is intended to be used in combination with BaseSession
and should not be instantiated on its own.
Intended usage
class Session(BaseSession, ExecMixin): ...
exec π
Performs the Exec operation.
Wraps the vaccel_exec()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| str | Path | The path to the shared object containing the function that will be called. | required |
| str | The name of the function contained in the above shared object. | required |
| list[Any] | The input arguments that will be passed to the called function. | required |
| list[Any] | The output arguments that will be passed to the called function. | required |
Returns:
Type | Description |
---|---|
list[Any] | The resulting outputs. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |
Source code in vaccel/ops/exec.py
exec_with_resource π
exec_with_resource(
resource: Resource, symbol: str, arg_read: list[Any], arg_write: list[Any]
) -> list[Any]
Performs the Exec with resource operation.
Wraps the vaccel_exec_with_resource()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| Resource | The resource of the shared object containing the function that will be called. | required |
| str | The name of the function contained in the above shared object. | required |
| list[Any] | The input arguments that will be passed to the called function. | required |
| list[Any] | The output arguments that will be passed to the called function. | required |
Returns:
Type | Description |
---|---|
list[Any] | The resulting outputs. |
Raises:
Type | Description |
---|---|
RuntimeError | If the |
FFIError | If the C operation fails. |