diff --git a/README.md b/README.md index 710b10a..0ea1f41 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,10 @@ def sample_func() -> None: executor = TimeoutExecutor(1) +result = executor.apply(sample_func) +assert isinstance(result, AsyncResult) try: - executor.apply(sample_func) + value = result.result() except Exception as exc: assert isinstance(exc, TimeoutError)