thread help
Peter Hansen
peter at engcorp.com
Wed Jun 16 07:21:57 EDT 2004
Roger Binns wrote:
> Peter Hansen wrote:
>
>>Sounds like you can't eat your cake and have it, too. If
>>you _could_ interrupt threads**, wouldn't that mean "the worker
>>threads just get abruptly stopped in the middle of what they
>>were doing"?
>
> I meant in the same way that can in Java. In that case an
> InterruptedException is thrown which the thread can catch
> and do whatever it wants with.
I didn't think things worked quite that way in Java. For
example, I thought InterruptedException was seen by a thread
only if it had actually been asleep at the time it was sent.
I also didn't know it would actually terminate certain
blocking calls, such as in socket stuff.
Oh well, it's been a while...
-Peter
More information about the Python-list
mailing list