/java-concurrency-patterns

Concurrency Patterns and features found in Java, through multithreaded programming. Threads, Locks, Atomics and more.

Primary LanguageJavaMIT LicenseMIT

Java Concurrency Patterns and Features

Concurrency Patterns and features found in Java, through multithreaded programming.

Features:

  • Threads and Runnables
  • Locks
    • Intrinsic
    • Explicit
      • Reentrant
      • ReadWrite
  • Synchronizers
    • Latches
    • Future Tasks
    • Semaphores
    • Barriers
  • Synchronized Collections
  • Concurrent Collections
    • CopyOnWriteArrayList
    • ConcurrentHashMap
    • Blocking Queue
  • Executors
    • Fixed Thread Pool
    • Cached Thread Pool
    • Single Thread Pool
    • Scheduled Thread Pool

Patterns

  • Protect Shared State
  • Lock Split
  • Protecting Composed Actions
  • Fixed Lock Ordering
  • Thread Local Confinement
  • Immutable Object
  • Safe Instantiation
  • Safe Publication
  • Interruption
  • Resource Pool
  • Condition Queues (wait-notify / await-signal)
  • Background Task Executor
  • Task Cancel
  • Producer-Consumer
  • Task Convergence
  • Non-Blocking with Atomics
  • Controlled Concurrent Initialization

About

Patterns and Algorithms inspired by the Java Concurrency in Practice book.