I have a producer of data, and a consumer of data. The producer produces asynchronously, and in turn I would like the consumer to consume asynchronously when there is data to consume.
My immediate thought to solve this problem is to use some queue object that has an awaitable shift/get, much like this async queue in the python standard
However, I searched and I couldn't find any JS libraries that have this type of data structure for me to use. I would have thought this would be a common pattern.
What is the common pattern for solving this problem in JS, and are there any libraries to help?