Tagged articles
12 articles
Page 1 of 1
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.

CPOSIXcondition variable
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.

c-programmingcondition variablepthread
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.

Queueconcurrencycondition variable
0 likes · 20 min read
Understanding and Using sync.Cond in Go: Source Code Analysis and Practical Examples
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.

SynchronizationThread Specific Datacondition variable
0 likes · 11 min read
PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques