A series of tutorials on java multi-threading.
-
Creating threads by extending Thread or implementing Runnable and passing it to Thread constructor
-
volitile keyword - synchronizing variables for reads on multiple threads
-
synchronized methods - obtaining intrinsic lock on object for synchronizing both memory reads and writes
-
synchronized statements - a more flexible way of obtaining locks
-
Thread pools - a way to reuse the threads, and reducing thread creation overhead
-
CountdownLatch - a way to gain some control over the execution of threads in thread pool
-
ArrayBlockingQueue - a simulation of consumer producer relationship with limited producer storage and possible product shortages
-
wait() and notify() with synchronized methods - a way of passing control between the threads
-
wait() and notify() with synchronized statements
-
ReentrantLocks - a more flexible way of obtaining a lock that goes beyond method or code block
-
Deadlock - two or more threads blocking each other execution due to each inability to obtain a required lock and a solution with acquireLocks () method
-
Semaphores - a way to limit a number of parralel threds
-
Future and Callable interface - a way to receive a value back from running a background thread
-
Interrupting threads - stopping threads that run for too long