Masoud Farsi's repositories
BlockQueue
The BlockQueue pattern is a thread-safe queue implementation that allows multiple threads to push and pop elements concurrently. It provides synchronized access to the underlying queue, ensuring that no data race occurs between threads.
FactroyDesign
Factory Design Pattern with Modern C++20
Gmail-Buttons-Chrome-Extension
Adds buttons to Gmail that inserts custom tags and gifs
LazyInitialization
This C++20 solution enables lazy initialization for multithreaded tasks. It efficiently initializes an expensive object only when needed, ensuring thread safety. It utilizes std::once_flag and std::atomic<bool> for synchronization, optimizing resource utilization and scalability.
MemoizationMultiThreading
Sample project demonstrating the use of memoization, dynamic programming, and multi-threading to efficiently handle repeated heavy tasks and optimize performance. Results are cached for quick retrieval, and Multi-Threaded processing accelerates computation.
piCalculator
a C++ program that demonstrates the use of a thread pool for efficiently calculating the value of PI using multiple threads. The program utilizes a thread pool to distribute the computation of PI across available CPU cores, improving performance through parallel processing.
SingleTon
This repository contains an implementation of the Singleton Lazy Initialization design pattern in C++20. The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance.
ThreadPool
A C++ project demonstrating the Thread Pool pattern for efficient concurrency. This program intelligently distributes threads equally among the heavy tasks, allowing for concurrent execution and optimized CPU utilization.
ThreadPoolManager
ThreadPoolManager is a C++ project that implements an efficient multi-threading system using a thread pool for generic functions of the same type and different tasks. It includes task management, synchronization mechanisms, and thread-safe logging to demonstrate concurrent task execution.