Tagged articles

Condition Variable

13 articles · Page 1 of 1
Java Tech Workshop
Java Tech Workshop
Sep 6, 2026 · Fundamentals

How Does AQS Queue Threads? CLH Queue, State & Condition Variables Deep Dive

This article provides a comprehensive source-code-level analysis of Java's AbstractQueuedSynchronizer (AQS), detailing its three core components—state, CLH wait queue, and ConditionObject—and walking through exclusive lock acquisition/release, fair vs non-fair locking, shared lock propagation, and condition variable await/signal mechanics with code examples.

AQSCLH queueCondition Variable
0 likes · 37 min read
How Does AQS Queue Threads? CLH Queue, State & Condition Variables Deep Dive
Deepin Linux
Deepin Linux
Feb 7, 2026 · Fundamentals

Mastering Linux Process Synchronization: Prevent Race Conditions with Mutexes, Semaphores, and More

This comprehensive guide explains why race conditions occur in Linux processes, explores the underlying concepts of critical sections and synchronization, and provides practical examples of atomic operations, mutexes, semaphores, condition variables, read‑write locks, and spinlocks to ensure safe concurrent programming.

C++Condition VariablePOSIX
0 likes · 39 min read
Mastering Linux Process Synchronization: Prevent Race Conditions with Mutexes, Semaphores, and More
Liangxu Linux
Liangxu Linux
Nov 16, 2025 · Fundamentals

Mastering pthread Condition Variables: Efficient Thread Wait‑Notify in Linux

This article explains the core principles, API usage, and best‑practice steps for pthread condition variables in embedded Linux, showing why they must be paired with mutexes, how to avoid lost wake‑ups, when to use signal versus broadcast, and includes a complete C example with practical tips.

Condition VariableThread Synchronizationc-programming
0 likes · 9 min read
Mastering pthread Condition Variables: Efficient Thread Wait‑Notify in Linux
Liangxu Linux
Liangxu Linux
Aug 5, 2025 · Fundamentals

Master C++11 Condition Variables: From Basics to Thread‑Pool Mastery

This article explains what C++11 condition variables are, why they are essential for efficient multithreading, shows their basic usage with std::condition_variable and std::mutex, walks through a producer‑consumer example, demonstrates a thread‑pool implementation, and lists crucial best‑practice tips.

C++C++11Concurrency
0 likes · 15 min read
Master C++11 Condition Variables: From Basics to Thread‑Pool Mastery
Go Programming World
Go Programming World
Dec 30, 2024 · Backend Development

Understanding and Using sync.Cond in Go: Source Code Analysis and Practical Examples

This article explains the purpose, internal implementation, and correct usage patterns of Go's sync.Cond concurrency primitive, walks through its source code, demonstrates simple and advanced examples—including a custom concurrent waiting queue—and provides test cases to illustrate its behavior in real-world scenarios.

ConcurrencyCondition VariableQueue
0 likes · 20 min read
Understanding and Using sync.Cond in Go: Source Code Analysis and Practical Examples
Linux Kernel Journey
Linux Kernel Journey
Sep 21, 2024 · Fundamentals

Synchronizing Linux Shared Memory IPC: Semaphores, Mutexes, and Condition Variables (with Code)

The article explains how to ensure data correctness in Linux inter‑process shared memory communication by using synchronization mechanisms—semaphores, mutexes, and condition variables—providing step‑by‑step code examples for each method and discussing their proper initialization, usage, and potential pitfalls.

C++Condition VariableIPC
0 likes · 15 min read
Synchronizing Linux Shared Memory IPC: Semaphores, Mutexes, and Condition Variables (with Code)
DeWu Technology
DeWu Technology
Nov 23, 2020 · Fundamentals

PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques

This session reviews PThread fundamentals and advanced techniques in C, covering thread creation, termination, attributes, mutexes, reader‑writer locks, condition variables, semaphores, barrier synchronization, and thread‑specific data, with code examples and a concluding homework assignment.

Condition VariableSemaphoreThread Specific Data
0 likes · 11 min read
PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques