[Deploying Sakai] killing threads

Charles Hedrick hedrick at rutgers.edu
Wed Oct 28 19:25:20 PDT 2009

Of course, given that I typically look at what code is looping, I  
could probably use Thread.stop with a signal that makes sense at that  

On Oct 28, 2009, at 10:20 PM, Charles Hedrick wrote:

>>> however Thread.stop() is considered unsafe:
>>  http://stackoverflow.com/questions/1102094/killing-thread-instantly-in-java
>> and even Sun's own disclaimer:
>>  http://java.sun.com/j2se/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html
>> which is why I've never even attempted it...
> I read that. However the alternative is to leave the thread in the  
> loop. The inconsistency is still there. In addition, the looping  
> thread could have some critical data structure locked. In that case  
> the JVM (or perhaps one user or one test, etc) could be unusable.  
> I've never actually seen that in one of these looping situations.  
> There's no really safe alternative other than restarting the JVM,  
> and even that could leave the database in an inconsistent state. You  
> pays your money and takes your choice.
> _______________________________________________
> production mailing list
> production at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/production
> TO UNSUBSCRIBE: send email to production-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/production/attachments/20091028/6a68ed96/attachment.html 

More information about the production mailing list