1. Callable and Future
The Callable interface is similar to Runnable, in that both are designed for classes whose instances are potentially executed by another thread. A Runnable, however, does not return a result and cannot throw a checked exception.

1.1 JDK API
1.2 Using Callable to Return Results From Runnables
1.3 Java 5 Concurrency: Callable and Future
1.4 Concurrency: I Can See Into Your Future

2. Concurrent ReadWriteLock
Think of a scenerio that there are many reader threads that reads a shared data frequently and only one writer thread that updates shared data. It’s not necessary to exclusively lock access to shared data while reading because multiple read operations can be done in parallel unless there is a write operation.

2.1 JDK API
2.2 ReadWriteLock example in Java
2.3 Java 5 Concurrency Reader Writer Locks
2.4 ReentrantLock: test for deadlocks
2.5 Read / Write Locks in Java
2.6 Declarative Synchronization with Java 5’s ReadWriteLock
2.7 Read-write locks

3. Locks

3.1 JDk API
3.2 Locks in Java
3.3 Explicit locks in Java 5
3.4 ReentrantLock Example
3.5 More flexible, scalable locking in JDK 5.0
3.6 Java 5 Concurrency: Locks
3.7 Using ReentrantLock for thread synchronization

4. Lock Conditions

4.1 JDK API
4.2 Java 5 Concurrency: Conditions
4.3 Java 1.5: collection and thread

5. Implementing Read-Write Locks by yourself

5.1 Understanding Java Multithreading and Read-Write Locks, Part 1
5.2 Implementing Read-Write Locks in Java
5.3 Concurrency: Understanding the Value of Read-Write Locks
5.4 Java Thread Programming: Implement Read & Write Locks

6. Thread Interrupt
An interrupt is an indication to a thread that it should stop what it is doing and do something else. It’s up to the programmer to decide exactly how a thread responds to an interrupt, but it is very common for the thread to terminate.

6.1 JDK API
6.2 Shutting down threads cleanly
6.3 Thread interrupt Method to Terminate Thread
6.4 Java: Handling Interrupts
6.5 Dealing with InterruptedException

Advertisements