Jan. 11, 2011
1:21 p.m.
On 03:10 am, screwtape@froup.com wrote:
Futures may call their callbacks in any thread. So the line:
d.fail(e)
must instead be something like:
reactor.callFromThread(d.errback, e)
PEP 3148 says: # Added callables are called in the order that they were added and are # always called in a thread belonging to the process that added them.
I assumed that implied some kind of internal .callFromThread() magic; I could be wrong.
It just says "a thread", it doesn't say which. And since there's nothing like a reactor in PEP 3148, there's no way Futures could do this on their own. Jean-Paul