We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e960d6 commit a724a69Copy full SHA for a724a69
samples.md
@@ -186,7 +186,7 @@ for (int i = 0; i != ProducerCount; ++i) {
186
for (int i = 0; i != ConsumerCount; ++i) {
187
consumers[i] = std::thread([&]() {
188
Item item;
189
- while (promisedElementsRemaining.fetch_sub(1, std::memory_order_relaxed)) {
+ while (promisedElementsRemaining.fetch_sub(1, std::memory_order_relaxed) > 0) {
190
q.wait_dequeue(item);
191
consumeItem(item);
192
}
0 commit comments