Giter Site home page Giter Site logo

MD AZAD ALI SHAH's Projects

call_once-magic-multi-threading icon 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 icon 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.

deadlock-multiple-solutions icon 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.

design_stack_with_unittest_golang icon 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

smart-raii icon 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.