Code Monkey home page Code Monkey logo

Comments (2)

bshoshany avatar bshoshany commented on May 17, 2024

Thanks for the comment. In the initial version I used std::packaged_task, but I found that std::shared_ptr actually provides better performance. However, I'm currently working on a new version (v3.0.0) that is essentially going to be rewritten from scratch, and in that version I am going to try std::packaged_task again and see if it works better.

from thread-pool.

bshoshany avatar bshoshany commented on May 17, 2024

Update: After reviewing past issues I realized that in #26 it was mentioned that using std::packaged_task makes the library incompatible with MSVC. Therefore, I have decided to keep using std::shared_ptr in submit() for the time being. However, I did slightly modify the code to use std::make_shared for creating the shared pointer, which only performs one allocation instead of two, and therefore should increase performance. This will be implemented in v3.0.0, which will be released in the next few days.

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.