Source: src/cwsandbox/_types.py:26
Generic ref for async operations with lazy result retrieval.
OperationRef wraps a concurrent.futures.Future and provides a unified interface
for both synchronous and asynchronous result retrieval. This enables the
sync/async hybrid API where operations return immediately and results are
retrieved lazily.
Methods
result
Block until the result is ready and return it.
Parameters
timeout (float | None): Maximum seconds to wait. None means wait forever.
Returns
T: The result of the operation.
Raises
concurrent.futures.TimeoutError: If timeout expires before completion.
concurrent.futures.CancelledError: If the operation was cancelled.
Exception: Any exception raised by the operation.
Last modified on September 21, 2026