From b636098169a327d2b679bc1fa6009e0a5b9a8466 Mon Sep 17 00:00:00 2001 From: phi Date: Thu, 29 Feb 2024 19:40:39 +0900 Subject: [PATCH] fix: readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)