Chapter 8. Inter-thread Communication


When multiple threads are running inside an application, most of them will need to communicate with each other in some form. In Chapter 5, "Gracefully Stopping Threads," crude inter-thread communication was accomplished by one thread interrupting another thread. As a general guideline, the use of interrupt() should be reserved for situations where you want to interrupt a thread to signal ...

Get Java Thread Programming now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.