cameron314 / cameron314/concurrentqueue

To use one concurrent queue between multiple threads

Open
#377 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.5k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

My use case is that I have one function which will enqueue data in the queue & I have multiple threads which will dequeue & use this data at the same time one by one.

Is it possible with concurrent queue by only using single queue ?
The issue is if first thread dequeue's a data element from the queue then that data element will no more be available in the queue so how the other threads will dequeue same data element & use it?

So is there any way that only one dequeue operation happens between all the threads?

Or else any other way to resolve this using concurrent queue please suggest.

I have gone through sample examples but didn't find any example which fits my use case. So writing here, please provide your input.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file, test, or entry point. Start with the concurrent queue usage documentation and the sample examples referenced in the report; clarify whether the requested multi-threaded dequeue behavior is supported, then document a matching usage pattern or the required alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.