<<< | Index | Discussion and further reference >>> |
Classes Thread and Runnable create a new thread of execution
Thread's interrupt() method and the InterruptedException allow thread to
switch from current work to another method
it's very common to terminate the thread during the interrupt
The synchronized keyword prevents multiple threads to run a particular method concurrently
This allows to serialize access to the same data from multiple threads
Object.wait() method puts the thread to sleep:
until interrupt (described above), or
until another thread calls notifyAll()
<<< | Index | Discussion and further reference >>> |