↗ JetBrains 20% discount
Buy any product from JetBrains and get a 20% discount.
These tutorials demonstrates various concept of concurrency in Java programming language with examples.
How to create threads using java.lang.Thread and java.lang.Runnable?
What are thread priorities and how to use them?
Demonstrating the use of Thread#yield() method.
What are Daemon Threads in Java? What are their uses cases?
How to block a thread execution by using Thread#join() method?
What is thread interrupt and how to use it?
What are different states of a thread? Thread.getState() Examples.
The thread interference problem when different threads access same data and how to avoiding them?
How Intrinsic Locks work with examples.
What are synchronized blocks and when we should use them
What are deadlocks and how to prevent them?
Notification from one thread to another using Object.wait() and Object.notify() methods with examples.
Examples to demostrates what is starvation and how to avoid that.
Demonstration of what is thread livelock.
what is Happens before relation?
What is JSR-133 Java Memory Model?
Example of reader/writer threads facing visibility problem. Fixing the problem with volatile shared variable.
How members of a volatile object reference may not be visible?
Using synchronized block or java.util.concurrent.atomic classes for composite actions.
Example of reordering problem and how to fix that?
How to use java.util.Timer to schedule tasks?.
How java.lang.ThreadLocal provides a way to associate an object instance to a thread.
Quick description of the classes defined in the java.util.concurrent.atomic package.
Quick description of the Executor framework with a getting started example.
Thread pools concepts. Examples of ThreadPoolExecutor and Executors factory methods to create thread pools.
Scheduled thread pools concepts and examples.
Asynchronous computation result via Future interface
RunnableFuture Example
ScheduledFuture Example
RunnableScheduledFuture Example
Understanding CompletableFuture with examples
Using thenCombine(), thenAcceptBoth() and runAfterBoth() methods
thenCompose() Examples
CompletionStage's 'either' methods examples.
Handling exception in Completion stages.
CompletionStage.whenComplete() Example
Exploring fork/join framework as a work-stealing thread pool.
Understanding Semaphores with an example.
Understanding CountDownLatch with an example.
Understanding CyclicBarrier with an example.
Understanding Phaser with examples.
Understanding java.util.concurrent.Exchanger with example.
Understanding use of basic Atomic classes.
Understanding AtomicReference with example.
AtomicIntegerArray, AtomicLongArray, and AtomicReferenceArray Examples.
Understanding reflection based atomic field updaters.
Updating a reference variable and a boolean atomically.
Updating a reference object and int atomically.