This repository contains a collection of small but practical C++17 projects focused on multithreading, synchronization, and thread-safe data structures.
The goal is to demonstrate clean, maintainable, and production-style C++ code using standard library concurrency primitives.
These projects are intentionally lightweight, dependency-free, and written in a style commonly used in real-world backend systems.
A fixed-size thread pool implementation that:
- Manages a pool of worker threads
- Executes submitted tasks asynchronously
- Uses a task queue with proper synchronization
Concepts covered
std::threadstd::mutex,std::condition_variable- Task queues
- RAII-based resource management
A classic producer–consumer problem implementation with:
- A bounded shared buffer
- Proper blocking using condition variables
- Safe access to shared state
Concepts covered
- Mutex locking
- Condition variables
- Thread coordination
- Avoiding busy waiting
A thread-safe LRU (Least Recently Used) cache that:
- Supports concurrent
getandputoperations - Maintains eviction order using a doubly linked list
- Ensures correctness under multi-threaded access
Concepts covered
- Thread-safe data structures
- Cache eviction policies
- Lock-based concurrency control
- STL containers (
unordered_map,list)