Tag

Thread Communication

0 views collected around this technical thread.

Architect's Guide
Architect's Guide
Dec 26, 2023 · Fundamentals

Java Thread Communication Techniques: volatile, wait/notify, CountDownLatch, ReentrantLock with Condition, and LockSupport

This article demonstrates five Java thread‑communication approaches—using a volatile flag, Object.wait()/notify(), CountDownLatch, ReentrantLock with Condition, and LockSupport—each illustrated with complete code examples and explanations of their behavior and limitations.

ConcurrencyCountDownLatchLockSupport
0 likes · 10 min read
Java Thread Communication Techniques: volatile, wait/notify, CountDownLatch, ReentrantLock with Condition, and LockSupport
Top Architect
Top Architect
Aug 17, 2023 · Backend Development

Thread Communication in Java: volatile, wait/notify, CountDownLatch, ReentrantLock+Condition, and LockSupport

This article explains five Java thread‑communication techniques—volatile variables, Object.wait()/notify(), CountDownLatch, ReentrantLock with Condition, and LockSupport—providing code examples and detailed explanations of how each method works and its synchronization behavior, including sample programs that add elements to a list, demonstrate notification timing, and show how locks are acquired and released.

ConcurrencyCountDownLatchLockSupport
0 likes · 11 min read
Thread Communication in Java: volatile, wait/notify, CountDownLatch, ReentrantLock+Condition, and LockSupport
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 16, 2020 · Backend Development

Using Condition to Replace wait/notify for Safer and Faster Java Thread Communication

This article explains why Java's Condition class should replace wait/notify for thread communication, demonstrates the thread‑livelock problem with notify, shows how Condition avoids it, compares performance with notifyAll, and provides complete code examples for producer‑consumer scenarios.

ConcurrencyConditionPerformance
0 likes · 13 min read
Using Condition to Replace wait/notify for Safer and Faster Java Thread Communication
Selected Java Interview Questions
Selected Java Interview Questions
Jul 30, 2020 · Backend Development

Java Thread Communication Techniques: join, wait/notify, CountDownLatch, CyclicBarrier, Callable and FutureTask

This article explains various Java thread‑communication mechanisms—including thread.join(), object.wait()/notify(), CountDownLatch, CyclicBarrier, Callable, and FutureTask—through clear examples, code snippets, and execution results, helping developers coordinate thread execution and retrieve results from worker threads.

ConcurrencyJava ConcurrencyMultithreading
0 likes · 15 min read
Java Thread Communication Techniques: join, wait/notify, CountDownLatch, CyclicBarrier, Callable and FutureTask
Selected Java Interview Questions
Selected Java Interview Questions
Dec 14, 2019 · Backend Development

Java Thread Communication Methods: Synchronized, Polling, wait/notify, and Piped Streams

This article explains four common Java thread communication techniques—synchronized blocks, while‑polling, wait/notify, and piped streams—providing code examples and discussing their advantages, drawbacks, and practical usage in multithreaded applications.

MultithreadingPiped StreamsSynchronization
0 likes · 10 min read
Java Thread Communication Methods: Synchronized, Polling, wait/notify, and Piped Streams
vivo Internet Technology
vivo Internet Technology
Mar 22, 2018 · Fundamentals

Understanding Concurrency: Communication, Synchronization, and Java Memory Model

The article explains why Java concurrency is essential, outlines its risks, and details how thread communication and synchronization work, covering the Java Memory Model, the roles of volatile and synchronized for visibility and ordering, and illustrating these concepts with code examples.

ConcurrencyHappen-BeforeJMM
0 likes · 16 min read
Understanding Concurrency: Communication, Synchronization, and Java Memory Model