MD AZAD ALI SHAH's repositories
Singleton_Thread-Safe-Multiple-Solutions
Implementation of thread safe Singleton: Solution-1: By using mutex and atomic Solution-2: By using call_once and lambda function
Python-ClientServer-RESTful-MultiThread-Mutex
This project use some advanced features of Python like - Client-Server, Server exposed to RSTFUL webservice using Flask, Multi-threading, Locking mechanism etc.
Deadlock-Multiple-Solutions
This project shows how deadlock is produced and multiple possible solutions to avoid deadlock. STEPS TO AVOID DEADLOCK: i) Avoid locking multiple mutexes but only 1 mutex if possible ii) After locking mutex, avoid calling user provided funtion (that can access/modify the resource without being locked) iii) If you require to lock more than 1 mutex then try to user API/RAII provided by modern C++ (which are discussed in this project) iv) If you can't use API/RAII mentioned in iii) above then lock the mutexes in the same order.
FlightBoardingAlert-Observer-Design-Pattern
Real life example of alerting Passengers when Flight Boarding Gate is opened by using Observer Design Patter
Functional_Prgramming_With_UnitTest-GoogleTest
A simple demo of Functional Programming with Unit Test by using GoogleTest in C++11/14
Minimum-Stack-Design_Thread-Safe_With-UnitTest_Golang
Design a thread-safe stack to get minimum value in O(1) time with test in Golang
Smart-RAII
This is to demonstrates how shared_ptr can be smart enough to use as RAII in different scenarios other than just memory management. In this demo, we use it for closing file descriptor in normal and exception conditions.
TDD-TestDrrivenDevelopment-GoogleTestMock
Example of TDD by using Gtest/Gmock
Call_Once-Magic-Multi-Threading
This project shows how std::call_once magically restrict only one thread to call a block of code and avoid wrong use of mutex to protect data, thus increase efficiency.
Chicken_Eggs_Solution_By_Singleton_DP
We know that chickens hatch from eggs and eggs are laid by chickens. But the problem is "which came first: the chicken or the egg?" - Similar is the case of global objects creation - we are not sure which global variable is created first and which one after, when they are in different source files. Let's see how Singleton Design Pattern can solve this.
Design_Stack_With_UnitTest_Golang
Implementation of stack in Golang. This is a non-thread safe but exception safe Stack. Thread safe Stack with API to get minimum value is implemented in other repository : https://github.com/sheikhazad/Minimum-Stack-Design_Thread-Safe_Golang
Minimum-Stack-Design
Design a stack to get minimum value in O(1) time in C++
TemplateMetaProgramming-StaticPolymorphism
This is simple example of how Static Polymorphism is achieved by using Template Meta Programming(TMP)