#!/usr/bin/env python3
-# © Copyright 2021-2022, Scott Gasch
+# © Copyright 2021-2023, Scott Gasch
"""
A :class:`Future` that can be treated as a substutute for the result
if log_exceptions and not f.cancelled():
exception = f.exception()
if exception is not None:
- logger.warning(
+ logger.exception(
"Future 0x%x raised an unhandled exception and exited.",
id(f),
+ exc_info=exception,
)
- logger.exception(exception)
raise exception
yield smart_future_by_real_future[f]
except concurrent.futures.TimeoutError:
if not f.cancelled():
exception = f.exception()
if exception is not None:
- logger.warning(
+ logger.exception(
"Future 0x%x raised an unhandled exception and exited.",
id(f),
+ exc_info=exception,
)
- logger.exception(exception)
raise exception
assert len(done) == len(real_futures)
assert len(not_done) == 0