Data type for a “closable” queue to handle a stream of items for multiple producers and consumers
问题 Is there a specific type of Queue that is "closable", and is suitable for when there are multiple producers, consumers, and the data comes from a stream (so its not known when it will end)? I've been unable to find a queue that implements this sort of behavior, or a name for one, but it seems like a integral type for producer-consumer type problems. As an example, ideally I could write code where (1) each producer would tell the queue when it was done, (2) consumers would blindly call a