Added the ``quiet_exceptions`` argument and the logging of unhandled
exceptions.
"""
- # TODO: allow yield points in addition to futures?
+ # TODO: allow YieldPoints in addition to other yieldables?
# Tricky to do with stack_context semantics.
#
# It's tempting to optimize this by cancelling the input future on timeout
# one waiting on the input future, so cancelling it might disrupt other
# callers and B) concurrent futures can only be cancelled while they are
# in the queue, so cancellation cannot reliably bound our waiting time.
+ future = convert_yielded(future)
result = Future()
chain_future(future, result)
if io_loop is None:
self.assertEqual(results, [42, 43])
self.finished = True
+ @skipBefore35
+ @gen_test
+ def test_async_with_timeout(self):
+ namespace = exec_test(globals(), locals(), """
+ async def f1():
+ return 42
+ """)
+
+ result = yield gen.with_timeout(datetime.timedelta(hours=1),
+ namespace['f1']())
+ self.assertEqual(result, 42)
+ self.finished = True
+
@gen_test
def test_sync_return_no_value(self):
@gen.coroutine