[jcifs] Infinite loop of error messages

Jake Goulding goulding at vivisimo.com
Tue Oct 3 17:46:23 GMT 2006


Yup, interrupt is the correct way of telling a thread to stop in the 
middle of processing. There are 4 different interrupt cases, described 
in the following link:
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#interrupt()

I can have multiple threads accessing the same host. The fact that an 
interrupt can leave the Transport in a bad state is very annoying, 
because then other threads will pick up the same bad transport and keep 
using it. It is something like this that can cause log files to be 
filled with errors, as the timeout never has a chance to occur.

Caldarale, Charles R wrote:
>> From: jcifs at lists.samba.org On Behalf Of Michael B Allen
>> Subject: Re: [jcifs] Infinite loop of error messages
>>
>> I believe Thread.interrupt() is deprecated and with good reason.
>>     
>
> It is neither deprecated nor dangerous, as the interrupt exception can
> only occur in well-defined condtions when the target thread is already
> blocked; normally, the target thread has to poll the isInterrupted()
> method to see if anyone is trying to get its attention.
>
> Perhaps you're thinking of Thread.suspend() or Thread.stop(), which
> truly are abominations?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
>   

-- 

JAKE GOULDING
Software Engineer
goulding at vivisimo.com

Viví­simo [Search Done Right™]
1710 Murray Avenue
Pittsburgh, PA 15217 USA
tel: +1.412.422.2499 x105
fax: +1.412.422.2495
vivisimo.com      clusty.com



More information about the jcifs mailing list