[SERVER-35026] Add types for the Reader and Writer halves of the ProducerConsumerQueue Created: 16/May/18  Updated: 28/May/19  Resolved: 28/May/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: service_architecture_continuous_delivery
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-37797 Modify the producer consumer queue to... Closed
Participants:

 Description   

The ProducerConsumerQueue in util is meant to be used by separate threads for reading and writing.  It would be useful if it had specific types for those operations, which would statically enforce the correct usage of the type.

A helper method would probably look something like:

auto [producer, consumer] = makeProducerConsumerQueueHalves(...);

which would create the queue with make_shared, and construct each half with a shared ref.

The halves would each own the half of the api they use. On destruction, they'd call their associated close.


Generated at Thu Feb 08 04:38:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.