Thread Synchronization in C++: A Deep Dive into Condition Variables and Wait Patterns
Job Board за IT общността
Спонсори на събитието:
За събитието
*The event will be in English.
This event is part of the user group C/C++.
Agenda:
Multithreading in C++ isn’t just about protecting data; it’s about waiting efficiently. Active polling burns CPU cycles, while naive sleep() ruins application latency.
This talk explores std::condition_variable — the core tool for event-driven multithreading. We will go beyond basic syntax and dive into OS-level mechanics to understand the physics of thread synchronization.
Key Takeaways:
>>> Under the Hood: How CVs interact with the OS scheduler, and why the mutex and predicate are strictly required.
>>> Performance Benchmarks: Latency and CPU load comparison: sleep vs. condition_variable vs. C++20 std::atomic::wait.
>>> Production Pitfalls: Diagnosing Spurious/Lost wakeups and preventing the „Thundering Herd“ problem (notify_all vs notify_one).
>>> Architectural Patterns: Real-world use cases, including Backpressure handling, batching with wait_for, and Connection Pools.
>>> Modern C++20: When to replace CV with std::atomic::wait, and how to cleanly terminate threads using std::condition_variable_any and std::stop_token.
>>> Target Audience: Middle and Senior C++ developers who want to write latency-critical code and build predictable, resource-efficient multithreaded systems.
>>> Q&A
The event is free, but pre-registration is required.
USER GROUP: C/C++
This event is part of the C/C++ User Group. Every month we organize events on a C/C++ related topic. To make sure you don’t miss any interesting information on the topic – subscribe.
Organized by: DEV.BG is a specialized Job Board for IT jobs.
C/C++ Job Offers: If you are looking for a job related to C/C++, view the job listings here.
WHEN: May 26th, 7:30 pm
За лектора
>>> Last 3 years – Senior C++ Engineer at Luxoft Sofia
>>> On a project at the Mercedes-Benz hub.
>>> Born in Russia in 1973, along with the C language.
>>> Educated as a radio engineer.
>>> I wrote my first Turbo Basic program in 1991, a transient response graph for circuit theory, during my first year at university. In Turbo C++ during my second year, it was a program for calculating the Chi-square mathematical statistic, and then another for plotting the antenna radiation pattern for a wave channel. Back then, the primary program mode was text-based, and getting an image on the screen was already an achievement.
>>> I worked in various fields and was one of the first to implement Windows 2000, starting in 1999, including Active Directory, Remote Desktop, etc.
SQL Server OLAP for analyzing 50 years of medical data. Virtualization, since 2002.
Taught at university and college.
>>> Over the past 15 years, designed and implemented high-tech quest locations in Moscow. Designed and developed a dispatch/industrial/emergency communication system (VoIP/SIP).
>>> Private tutoring – computer science, physics, mathematics.
>>> At the end of 2016, my family and I moved to Bulgaria. My four adult children live and work between Varna and Bratislava.
Нашите
Партньори
In Bosch Engineering Center Sofia are developed innovative technologies for the automotive industry in areas such as driving assistance, automated driving, AI and electric mobility. Learn more at www.bosch.bg/ecs.
StorPool Storage develops a software product for distributed data storage in cloud environments.



