Skip to main content

Posts

Showing posts with the label concurrency

Java concurrency (multi-threading) - Tutorial

This article describes how to do concurrent programming with Java. It covers the concepts of parallel programming, immutability, threads, the executor framework (thread pools), futures, callables and the fork-join framework. Table of Contents 1. Concurrency 1.1. What is concurrency? 1.2. Process vs. threads 2. Improvements and issues with concurrency 2.1. Limits of concurrency gains 2.2. Concurrency issues 3. Concurrency in Java 3.1. Processes and Threads 3.2. Locks and thread synchronization 3.3. Volatile 4. The Java memory model 4.1. Overview 4.2. Atomic operation 4.3. Memory updates in synchronized code 5. Immutability and Defensive Copies 5.1. Immutability 5.2. Defensive Copies 6. Threads in Java 7. Threads pools with the Executor Framework 8. Futures and Callables 9. Nonblocking algorithms 10. Fork-Join in Java 7 11. Deadlock 1. Concurrency 1.1. What is concurrency? Concurrency is the abi...