Re: Howto pass exceptions between threads
- From: Alexander Eisenhuth <newsuser@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 06 Mar 2007 09:17:17 +0100
John Nagle schrieb:
Alexander Eisenhuth wrote:Hallo Alltogether,
I've searched in this mailing list, but it seems to me that there is no general approach to pass exceptions from one thread to another.
Very few languages have that.
Actually, it could be made to work for Python, but it would have to
be carefully designed. Something that raises an exception in another
thread the next time the thread blocks would have relatively sane
semantics. You couldn't raise an exception on a compute-bound thread,
only at block points (locks, I/O, long system calls.)
John Nagle
Yes you're right, it must be well designed with a clear responsibility delegation. I can imgagine the following points:
- Thread termination with termination handler (for Thread instance)
- Main Thread information / synchronisation
- Default/Customized main thread exception handler
.
- References:
- Howto pass exceptions between threads
- From: Alexander Eisenhuth
- Re: Howto pass exceptions between threads
- From: John Nagle
- Howto pass exceptions between threads
- Prev by Date: Re: persistent fifo queue class
- Next by Date: Re: Any way to determine test success from inside tearDown()?
- Previous by thread: Re: Howto pass exceptions between threads
- Next by thread: Dictionary of Dictionaries
- Index(es):
Relevant Pages
|