From fb6e6e94e73a2b34833a9dfd7c2c0db264d5e2a1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 20 Aug 2013 12:38:58 -0700 Subject: [PATCH] Add tulip.wait_for(). --- pep-3156.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pep-3156.txt b/pep-3156.txt index ccbf56133..a445fede1 100644 --- a/pep-3156.txt +++ b/pep-3156.txt @@ -1329,6 +1329,12 @@ package are provided: your ``for`` loop may not make progress (since you are not allowing other tasks to run). +- ``tulip.wait_for(f, timeout)``. This is a convenience to wait for a + single coroutine or Future with a timeout. It is a simple wrapper + around ``tulip.wait()`` with a single item in the first argument, + returning the result or raising the exception if it is completed + within the timeout, raising ``TimeoutError`` otherwise. + Sleeping --------