Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7771303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:37:05+00:00 2026-06-01T16:37:05+00:00

Does anyone has experience with the rather new std::async ? We are currently implementing

  • 0

Does anyone has experience with the rather new std::async? We are currently implementing a parallel file parser, which reads a file chunk and passes this chunk to an async function.

Using Clang (v3.0) this way works really fine with the default std::async policies (implementation dependent). On a two core machine, it fires up to 4 threads what works really well.

But with GCC (v4.7), the file reading thread does not spawn any new threads, making the program in the end completely sequential.

Using std::launch::async, both versions are pretty much doing the same (what should be the case).

Does anyone know the status of the current of GCC’s c++11 threading capabilities? Or might this be an error in our implementation?

Short code:

while (readNewChunk()) {
    Chunk &chunk = fileReader_.getChunk(); //reading the file
    ChunkLoader *chunkLoader = new ChunkLoader();
    auto ftr = std::async(std::launch::async, &ChunkLoader::createDictionaries, chunkLoader);
    dictCreationFutures_.push_back(std::move(ftr));
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:37:06+00:00Added an answer on June 1, 2026 at 4:37 pm

    The behavior is within spec, even if it’s not what you desire. If you don’t specify a launch policy, it is taken to be async|deferred, which means it is up to the implementation to decide which. GCC happens to always pick deferred if given a choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone here has any experience on how to send HTML emails that renders
Does anyone has experience with ZEND's framework for writing a RESTful API for an
does anyone has any experience of installing Liferay using SQL Server as database ?
Does anyone has a good solution for a C# version of the C++ __FUNCTION__
Does anyone has sources for visual explanations of algorithms (or maths) that is even
Does anyone has any insight on organizing sqlalchemy based projects? I have many tables
Does anyone has the code to a full working example of slartoolkit ( http://slartoolkit.codeplex.com/
Has anyone ever tested, or does anyone know, the performance differences of these two
Does anyone know if this has been released yet? I went to asp.net and
Does anyone know if Visual Studio 2008 has a mechianism in web applications to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.