In my app I have this simple piece of clock code:
while(!clockRunning){
time++;
repaint();
Thread.sleep(1000);
}
}catch (InterruptedException e){}
and I began curious what situation may cause exception above.
In my app I have this simple piece of clock code:
while(!clockRunning){
time++;
repaint();
Thread.sleep(1000);
}
}catch (InterruptedException e){}
and I began curious what situation may cause exception above.
from the Thread Javadoc :
if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
basicly when another thread calls this threads interrupt method