HowToDoInJava

  • Python
  • Java
  • Spring Boot
  • Dark Mode

Java Concurrency Tutorials

A multithreaded program contains two or more parts that can run concurrently and each part can handle different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs.

By definition multitasking is when multiple processes share common processing resources such as a CPU. Multithreading extends the idea of multitasking into applications where you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different applications, but also among each thread within an application.

Multithreading enables you to write in a way where multiple activities can proceed concurrently in the same program.

  1. Java DelayQueue
  2. ExecutorService – shutdown(), shutdownNow() and awaitTermination​()
  3. ExecutorService – Cancel a task in executor
  4. ScheduledExecutorService – Running task in executor after delay
  5. ExecutorService invokeAll()
  6. ExecutorService invokeAny()
  7. Callable Future Example
  8. Executor RejectedExecutionHandler
  9. ExecutorService in Java
  10. A Guide to AtomicInteger in Java
  11. Producer Consumer Problem Using BlockingQueue
  12. Java Thread Life Cycle and Thread States
  13. Concurrency vs. Parallelism
  14. Java Multi-threading Evolution and Topics
  15. Difference between lock and monitor – Java Concurrency
  16. ScheduledThreadPoolExecutor – Task Scheduling with Executors
  17. Java Callable Future Example
  18. Java Fixed Size Thread Pool Executor Example
  19. Java Thread Pool – ThreadPoolExecutor Example
  20. ConcurrentLinkedDeque Example – Non-blocking Thread-safe List
  21. Control concurrent access to multiple copies of a resource using Semaphore
  22. How to work with wait(), notify() and notifyAll() in Java?
  23. Binary Semaphore Tutorial and Example
  24. How to Use Locks in Java | java.util.concurrent.locks.Lock Tutorial and Example
  25. Creating Threads Using java.util.concurrent.ThreadFactory
  26. Java ThreadLocal Variables – When and How to Use?
  27. Restarting threads using UncaughtExceptionHandler
  28. Java Compare and Swap Example – CAS Algorithm
  29. Java Concurrency – Difference between yield() and join()
  30. Java Concurrency – Thread Safety?
  31. Throttling Task Submission Rate with ThreadPoolExecutor and Semaphore
  32. Java concurrency – CountDownLatch Example
  33. Java ConcurrentHashMap Best Practices
  34. Java executor framework tutorial and best practices
  35. Difference between Runnable vs Thread in Java
  36. Difference between sleep() and wait() in Java
  37. Object level lock vs Class level lock in Java
  38. Java Inter-thread Communication – PipedReader and PipedWriter
  39. Java ThreadPoolExecutor and BlockingQueue Example
  40. Java Deadlock Example and Solution

Search Tutorials

Java Concurrency Tutorial

  • Java Concurrency – Introduction
  • Concurrency Evolution
  • Thread Safety
  • Concurrency vs. Parallelism
  • Compare and Swap [CAS]
  • synchronized keyword
  • Object vs. Class Level Locking
  • Runnable vs. Thread
  • wait(), notify() and notifyAll()
  • Yield() vs. Join()
  • Sleep() vs. Wait()
  • Lock vs. Monitor
  • Callable + Future
  • UncaughtExceptionHandler
  • Throttling Task Submission
  • Executor Best Practices
  • Inter-thread Communication
  • Write and Resolve Deadlock

Java Concurrency Utilities

  • AtomicInteger
  • Lock
  • ThreadFactory
  • ThreadLocal
  • ExecutorService
  • ThreadPoolExecutor
  • FixedSizeThreadPoolExecutor
  • ScheduledThreadPoolExecutor
  • Semaphore
  • Binary Semaphore
  • BlockingQueue
  • DelayQueue
  • ConcurrentLinkedDeque
  • CountDownLatch
  • ForkJoinPool

Java Tutorial

  • Java Introduction
  • Java Keywords
  • Java Flow Control
  • Java OOP
  • Java Inner Class
  • Java String
  • Java Enum
  • Java Collections
  • Java ArrayList
  • Java HashMap
  • Java Array
  • Java Sort
  • Java Clone
  • Java Date Time
  • Java Concurrency
  • Java Generics
  • Java Serialization
  • Java Input Output
  • Java New I/O
  • Java Exceptions
  • Java Annotations
  • Java Reflection
  • Java Garbage collection
  • Java JDBC
  • Java Security
  • Java Regex
  • Java Servlets
  • Java XML
  • Java Puzzles
  • Java Examples
  • Java Libraries
  • Java Resources
  • Java 14
  • Java 12
  • Java 11
  • Java 10
  • Java 9
  • Java 8
  • Java 7

Meta Links

  • About Me
  • Contact Us
  • Privacy policy
  • Advertise
  • Guest and Sponsored Posts

Recommended Reading

  • 10 Life Lessons
  • Secure Hash Algorithms
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices Guide
  • Microservices Tutorial
  • REST API Tutorial
  • How to Start New Blog

Copyright © 2020 · HowToDoInjava.com · All Rights Reserved. | Sitemap

  • Sealed Classes and Interfaces