Re: Appending traceback from exception in child thread

2009-05-16 Thread Edd
On May 16, 4:02 am, "Gabriel Genellina" wrote: > You could use the 3-argument form of the raise > statement:http://docs.python.org/reference/simple_stmts.html#the-raise-statement Ah! When did that get there? :) > There is a problem: remember that the traceback object keeps a reference   > to a

Re: Appending traceback from exception in child thread

2009-05-16 Thread Diez B. Roggisch
Edd schrieb: Hi folks, I have a some threadpool code that works like this : tp = ThreadPool(number_of_threads) futures = [tp.future(t) for t in tasks] # each task is callable for f in futures: print f.value() # <-- may propagate an exception The idea being that a Future obj

Re: Appending traceback from exception in child thread

2009-05-15 Thread Gabriel Genellina
En Fri, 15 May 2009 15:09:45 -0300, Edd escribió: As the comment on the last line indicates, looking at the .value() of a Future may give the return value of the associated task, or it may also propagate an exception that was raised in a child thread. Inside the implementation I store caught e

Re: Appending traceback from exception in child thread

2009-05-15 Thread Chris Mellon
On Fri, May 15, 2009 at 1:09 PM, Edd wrote: > Hi folks, > > I have a some threadpool code that works like this : > >    tp = ThreadPool(number_of_threads) >    futures = [tp.future(t) for t in tasks] # each task is callable >    for f in futures: >        print f.value() # <-- may propagate an exc

Appending traceback from exception in child thread

2009-05-15 Thread Edd
Hi folks, I have a some threadpool code that works like this : tp = ThreadPool(number_of_threads) futures = [tp.future(t) for t in tasks] # each task is callable for f in futures: print f.value() # <-- may propagate an exception The idea being that a Future object represents