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 6710213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:59:45+00:00 2026-05-26T07:59:45+00:00

In particular, I am looking for a blocking queue. Is there such a thing

  • 0

In particular, I am looking for a blocking queue. Is there such a thing in C++11? If not, what are my other options? I really don’t want to go down to the thread level myself anymore. Way too error-prone.

  • 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-05-26T07:59:45+00:00Added an answer on May 26, 2026 at 7:59 am

    According to Diego Dagum from Microsoft’s Visual C++ Team:

    A recurrent question (well, one of the many) is about STL containers
    and whether they are thread safe.

    Taking Stephan’s words here, the reality is that they aren’t, not as a
    bug but as a feature: having every member function of every STL
    container acquiring an internal lock would annihilate performance. As
    a general purpose, highly reusable library, it wouldn’t actually
    provide correctness either: the correct level to place locks is
    determined by what the program is doing. In that sense, individual
    member functions don’t tend to be such correct level.

    The Parallel Patterns Library (PPL) includes several containers that provide thread-safe access to their elements:

    • The concurrent_vector Class is a sequence container class that allows random access to any element. It enables concurrency-safe append, element access, iterator access and iterator traversal operations.
    • The concurrent_queue Class is a sequence container class that allows first-in, first-out access to its elements. It enables a limited set of concurrency-safe operations, such as push and try_pop, to name a few.

    Some samples here.

    Also interesting: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html.

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

Sidebar

Related Questions

I've been looking at this http://blog.javia.org/assembly-java/ and in particular this bit #6: Don’t use
What alternatives are there to pylab for plotting in Python? In particular, I'm looking
Are there any existing user authentication libraries for node.js? In particular I'm looking for
In particular I'm looking for an IP address that I can put in my
Can pipes be used across LAN computers? In particular I'm looking for Windows, but
What is the best way to undertake Servlet profiling? In particular I am looking
Am looking for a query to sum values in a particular time duration say
I am looking for a way to determine when a particular file has changed,
I'm looking at trying to optimise a particular function in a PHP application and
I was looking a source code of a particular page of my project and

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.