How to force a thread to stop

Carl J. Van Arsdall cvanarsdall at mvista.com
Mon Jul 24 14:22:49 EDT 2006


Steve Holden wrote:
> Carl J. Van Arsdall wrote:
> [... rant ...]
>   
>> So with this whole "hey mr. nice thread, please die for me" concept gets 
>> ugly quickly in complex situations and doesn't scale well at all.  
>> Furthermore, say you have a complex systems where users can write 
>> pluggable modules.  IF a module gets stuck inside of some screwed up 
>> loop and is unable to poll for messages there's no way to kill the 
>> module without killing the whole system.  Any of you guys thought of a 
>> way around this scenario?
>>
>>
>>     
>
> Communications through Queue.Queue objects can help. But if you research 
> the history of this design decision in the language you should discover 
> there are fairly sound rasons for not allowing arbitrary "threadicide".
>
>
>   
Right, I'm wondering if there was a way to make an interrupt driven 
communication mechanism for threads?  Example: thread receives a 
message, stops everything, and processes the message. 


-- 

Carl J. Van Arsdall
cvanarsdall at mvista.com
Build and Release
MontaVista Software




More information about the Python-list mailing list