cameron314 / cameron314/concurrentqueue
Allocating producer objects in advance not knowing that threads will become producers?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.5k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
I would like to allocate memory up-front during initialization step of my application when worker threads have not been created yet.
Creating enough number of ProducerTokens and let each thread pick from it could be one solution but it needs object pool implementation and keeping per-thread, per-queue ProducerToken available to any code is cumbersome.
What could be the best approach to do it?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the ProducerToken usage and initialization assumptions described in the issue. Determine whether producer objects can be safely prepared before worker threads exist and what API or ownership model would be required. Done would require a documented, agreed approach; the issue does not name files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100