![](https://csdnimg.cn/release/download_crawler_static/10968099/bg12.jpg)
Section 122.5: volatile 661 ................................................................................................................................................
Section 122.6: synchronized 662 .....................................................................................................................................
Section 122.7: transient 663 .............................................................................................................................................
Chapter 123: Process 664 ...............................................................................................................................................
Section 123.1: Pitfall: Runtime.exec, Process and ProcessBuilder don't understand shell syntax 664 ......................
Section 123.2: Simple example (Java version < 1.5) 666 ...............................................................................................
Chapter 124: Java Native Access 667 .....................................................................................................................
Section 124.1: Introduction to JNA 667 ...........................................................................................................................
Chapter 125: Modules 668 ..............................................................................................................................................
Section 125.1: Defining a basic module 668 ...................................................................................................................
Chapter 126: Concurrent Programming (Threads) 669 ..................................................................................
Section 126.1: Callable and Future 669 ...........................................................................................................................
Section 126.2: CountDownLatch 670 ...............................................................................................................................
Section 126.3: Basic Multithreading 672 .........................................................................................................................
Section 126.4: Locks as Synchronisation aids 673 .........................................................................................................
Section 126.5: Semaphore 674 ........................................................................................................................................
Section 126.6: Synchronization 675 .................................................................................................................................
Section 126.7: Runnable Object 676 ................................................................................................................................
Section 126.8: Creating basic deadlocked system 677 .................................................................................................
Section 126.9: Creating a java.lang.Thread instance 679 .............................................................................................
Section 126.10: Atomic operations 680 ...........................................................................................................................
Section 126.11: Exclusive write / Concurrent read access 681 ......................................................................................
Section 126.12: Producer-Consumer 682 ........................................................................................................................
Section 126.13: Visualizing read/write barriers while using synchronized / volatile 684 ...........................................
Section 126.14: Get status of all threads started by your program excluding system threads 685 ........................
Section 126.15: Using ThreadLocal 686 ...........................................................................................................................
Section 126.16: Multiple producer/consumer example with shared global queue 687 .............................................
Section 126.17: Add two `int` arrays using a Threadpool 688 .......................................................................................
Section 126.18: Pausing Execution 689 ............................................................................................................................
Section 126.19: Thread Interruption / Stopping Threads 690 .......................................................................................
Chapter 127: Executor, ExecutorService and Thread pools 693 ................................................................
Section 127.1: ThreadPoolExecutor 693 ..........................................................................................................................
Section 127.2: Retrieving value from computation - Callable 694 ...............................................................................
Section 127.3: submit() vs execute() exception handling dierences 695 ..................................................................
Section 127.4: Handle Rejected Execution 697 ..............................................................................................................
Section 127.5: Fire and Forget - Runnable Tasks 697 ...................................................................................................
Section 127.6: Use cases for dierent types of concurrency constructs 698 .............................................................
Section 127.7: Wait for completion of all tasks in ExecutorService 699 ......................................................................
Section 127.8: Use cases for dierent types of ExecutorService 701 ..........................................................................
Section 127.9: Scheduling tasks to run at a fixed time, after a delay or repeatedly 703 ..........................................
Section 127.10: Using Thread Pools 704 .........................................................................................................................
Chapter 128: ThreadLocal 705 ....................................................................................................................................
Section 128.1: Basic ThreadLocal usage 705 ..................................................................................................................
Section 128.2: ThreadLocal Java 8 functional initialization 706 ..................................................................................
Section 128.3: Multiple threads with one shared object 707 ........................................................................................
Chapter 129: Using ThreadPoolExecutor in MultiThreaded applications. 709 ....................................
Section 129.1: Performing Asynchronous Tasks Where No Return Value Is Needed Using a Runnable Class
Instance 709 ..............................................................................................................................................................
Section 129.2: Performing Asynchronous Tasks Where a Return Value Is Needed Using a Callable Class
Instance 710 ..............................................................................................................................................................