Java Reference
In-Depth Information
CHAPTER
30
M ULTITHREADING
AND P ARALLEL
P ROGRAMMING
Objectives
To get an overview of multithreading (§30.2).
To develop task classes by implementing the Runnable interface
(§30.3).
To create threads to run tasks using the Thread class (§30.3).
To control threads using the methods in the Thread class (§30.4).
To control animations using threads and use Platform.runLater
to run the code in the application thread (§30.5).
To execute tasks in a thread pool (§30.6).
To use synchronized methods or blocks to synchronize threads to
avoid race conditions (§30.7).
To synchronize threads using locks (§30.8).
To facilitate thread communications using conditions on locks
(§§30.9 and 30.10).
To use blocking queues ( ArrayBlockingQueue ,
LinkedBlockingQueue , PriorityBlockingQueue ) to
synchronize access to a queue (§30.11).
To restrict the number of concurrent tasks that access a shared
resource using semaphores (§30.12).
To use the resource-ordering technique to avoid deadlocks (§30.13).
To describe the life cycle of a thread (§30.14).
To create synchronized collections using the static methods in the
Collections class (§30.15).
To develop parallel programs using the Fork/Join Framework (§30.16).
 
 
 
Search WWH ::




Custom Search