Giter Site home page Giter Site logo

Comments (2)

bshoshany avatar bshoshany commented on May 11, 2024

Hi @renzibei and thanks for the suggestion! :)

One of the main design philosophies behind this thread pool library is that it should be as light, portable, and self-contained as possible. I want it to be just one header file that will work on any platform that has a C++17-compliant compiler. Therefore, I limit myself to using only standard C++17, with no external dependencies such as Boost. I am aware that a lock-free queue could improve the performance of this library, but I don't want that to be at the cost of the lightness and portability of the library.

I'm working on a version that uses condition variables instead of sleep, and planing a C++20 version that will use semaphores, both of which should improve the performance. I will also take a look at how Boost implements the lock-free queue and see if I can perhaps implement something similar in my library. All of this will probably take at least a month or two though since I'm really busy these days with teaching and grant applications.

from thread-pool.

bshoshany avatar bshoshany commented on May 11, 2024

Update: v3.0.0, to be released in the next few days, will modify the thread pool to use std::condition_variable, which substantially improves performance. Looking into lock-free queues is still on my TODO list for a future release.

from thread-pool.

Related Issues (20)

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.