Just worked through the first two parts of the online Java Concurrency Tutorial ('Processes and Threads', 'Thread Objects'). Learnt about the
Thread class versus the
Runnable interface (including the
run()/
start() methods) as well as the
sleep(),
interrupt(),
join() methods and the
InterruptedException class.
1 comment:
java Thread interrupt method
one important thing to know about this method :
This method throws interruption exception only for waiting thread .
If thread is not in waiting status thread's interrupted status will be set to true but it won't stop it's execution there instead thread will continue running normally
Effective java simplified
Java concurrency interrupt method theory
Post a Comment