Threads of Control |
Synchronization
Often, threads need to share data. For example, suppose you have a thread that writes data to a file while, at the same time, another thread is reading data from that same file. When your threads need to share information you need to synchronize the threads to get the desired results.Deadlock
Deadlock occurs when two threads are waiting for some condition to change that is precluded from changing because of all threads that can change the condition are waiting. This page uses the dining philosophers to illustrate the problem of deadlock, and discusses various ways to avoid it.Re-entrant Monitors
Java monitors are re-entrant.Volatile
[PENDING: This technology is under construction.]
Threads of Control |