This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bar.harel
Recipients bar.harel
Date 2020-07-22.22:39:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595457551.15.0.0734023234178.issue41372@roundup.psfhosted.org>
In-reply-to
Content
Asyncio has an amazing mechanism showing "Task exception was never retrieved" or "Future exception was never retrieved" if the task threw an exception, and no one checked its `.result()` or `.exception()`.

It does so by setting a private variable named `__log_traceback` to False upon retrieval, and logging at `__del__` if the exception wasn't retrieved.

I believe it's a very important mechanism missing from concurrent.futures. It's very easy to implement.

I wanted to see if there's any disagreement before I implement it though. It's small enough to not need python-ideas yet important enough for inclusion I believe.

Regarding potential issues - I can only see issues with unlikely deadlocks at `__del__` (think of a handler taking a lock and this occurs during the handling of another log record). Asyncio however already took that bet, and although it's less planned for multi-threading, it's still a bet that was totally worth it.
History
Date User Action Args
2020-07-22 22:39:11bar.harelsetrecipients: + bar.harel
2020-07-22 22:39:11bar.harelsetmessageid: <1595457551.15.0.0734023234178.issue41372@roundup.psfhosted.org>
2020-07-22 22:39:11bar.harellinkissue41372 messages
2020-07-22 22:39:10bar.harelcreate