[wingide-users] Better debugging with `futures`

cool-RR cool-rr at cool-rr.com
Sat Aug 21 09:26:25 MDT 2010


I've recently started using `ThreadPoolExecutor` from the
`futures`<http://code.google.com/p/pythonfutures/>package. (Which is
going
to be added<http://jessenoller.com/2010/07/11/pep-3148-accepted-futures-execute-computations-asynchronously/>to
Python's standard library.)

There's a little annoyance when using Wing to debug code that
uses `ThreadPoolExecutor`. When the thread workers get an exception raised,
it gets caught and then passed to the main thread so it can raise it itself.
This is annoying because then we're not getting a good traceback for the
exception, and we're unable to use the debug probe to investigate.

It would be nice if Wing would pause when the thread gets the original
exception, before it gets caught. If I understand correctly, this is what
Wing currently does with wxPython when there's an exception in an event
handler, so it'd be nice if it would do it for `futures` too.


Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/wingide-users/attachments/20100821/eeb870ef/attachment.html


More information about the wingide-users mailing list