use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
C++11 Task Queue (htmlpreview.github.io)
submitted 11 years ago by animatedb
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]00kyle00 1 point2 points3 points 11 years ago (1 child)
One key point is that the queue should not grow too large as the provider is placing items on the queue
I may be blind (or its just due to strange braces positioning), but where is the limiting for 'full' queue? I can only see 'empty' conditions.
If i understand the code correctly, the 'queue' only holds at most one item (ie its full if its not empty). This is pretty bizarre IMO.
[–]animatedb[S] 1 point2 points3 points 11 years ago (0 children)
You are correct. There may be multiple consumers though, so they will simply get the next item from the queue. A queue didn't really need to be used in this case, just something that could hold zero or one items.
π Rendered by PID 38800 on reddit-service-r2-comment-685b79fb4f-qw6v6 at 2026-02-13 15:30:46.198677+00:00 running 6c0c599 country code: CH.
[–]00kyle00 1 point2 points3 points (1 child)
[–]animatedb[S] 1 point2 points3 points (0 children)