Tagged articles
condition variable
14 articles · Page 1 of 1

TonyBaiOct 5, 2026 · Backend Development
The article traces the 10-year history of Go issue #16620, which sought to make sync.Cond selectable, explains the level-vs-edge-triggered conflict, reviews community workarounds, and details bradfitz's new Mutex.LockChan() demo that enables cancellable locking via select.
ConcurrencyGoGo proposal
0 likes · 14 min read

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 QueueJava Concurrency
0 likes · 37 min read

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++MutexPOSIX
0 likes · 39 min read

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.
c-programmingcondition variablepthread
0 likes · 9 min read

This article explains the concept, core features, basic usage, member functions, best practices, and real-world scenarios of C++11's std::condition_variable, including a complete producer‑consumer example and comparisons with atomic operations.
C++MultithreadingProducer-Consumer
0 likes · 8 min read

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

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.
ConcurrencyQueuecondition variable
0 likes · 20 min read

This article provides a comprehensive overview of Linux thread synchronization, explaining core concepts such as mutexes, condition variables, semaphores, and futexes, describing their implementation details, code examples, and common usage scenarios like producer‑consumer and reader‑writer problems.
LinuxMutexSemaphore
0 likes · 33 min read

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++IPCLinux
0 likes · 15 min read

This article explains the purpose, types, best practices, and common use cases of synchronization primitives—including mutexes, condition variables, semaphores, and wait groups—in Go, and provides concrete code examples to illustrate safe concurrent programming.
Gocondition variable
0 likes · 6 min read

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.
MultithreadingMutexSemaphore
0 likes · 11 min read

This article explains how Go's sync.Cond works, demonstrates its usage with practical code examples, analyzes its internal implementation, and shows a real‑world application in Kubernetes FIFO queues, helping developers control goroutine synchronization effectively.
BackendConcurrencyGo
0 likes · 6 min read

This article reviews Python threading fundamentals—including mutex locks and condition variables—explains their interaction, compares threading.Lock with threading.RLock, and presents a concise implementation of a thread‑safe task queue with illustrative diagrams and test code.
ConcurrencyMutexPython
0 likes · 5 min read


ITPUBMay 19, 2016 · Fundamentals
This article explains how to use Linux pthread condition variables, covering initialization, the pthread_cond_wait function, signal handling, and a complete C example that demonstrates thread coordination and mutex interaction for reliable multithreaded programming.
C++LinuxMultithreading
0 likes · 5 min read
