Message206673
| Author |
vstinner |
| Recipients |
gvanrossum, pitrou, python-dev, vstinner |
| Date |
2013年12月20日.09:55:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1387533328.06.0.922737653156.issue19967@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I think this patch is bad and should be reverted. It always calls traceback.format_exception() which is an expensive operation, while the _TracebackLogger takes care to call it only when necessary.
Oh, I didn't notice that, and I agree that the new code is inefficient.
Since the Future object does not release the reference to the exception after result() or exception() has been called, there is no need to preformat the exception. It can be done in the destructor.
Attached asyncio_defer_format_tb.patch implements that.
Future.set_exception() creates a reference cycle. I created the issue #20032 to discuss that. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年12月20日 09:55:28 | vstinner | set | recipients:
+ vstinner, gvanrossum, pitrou, python-dev |
| 2013年12月20日 09:55:28 | vstinner | set | messageid: <1387533328.06.0.922737653156.issue19967@psf.upfronthosting.co.za> |
| 2013年12月20日 09:55:28 | vstinner | link | issue19967 messages |
| 2013年12月20日 09:55:27 | vstinner | create |
|