Skip to content

Fix producer-consumer pattern in concatObjAndHeader#28

Open
ppulc wants to merge 1 commit intoawslabs:mainfrom
ppulc:fix_producer_consumer
Open

Fix producer-consumer pattern in concatObjAndHeader#28
ppulc wants to merge 1 commit intoawslabs:mainfrom
ppulc:fix_producer_consumer

Conversation

@ppulc
Copy link

@ppulc ppulc commented Nov 25, 2024

The whole producer loop needs to be enclosed in a goroutine to allow the main thread to start consuming the messages from the queue.

Otherwise the whole waitgroup was consumed without any message being read from the queue and writes were blocked as well because the queue is unbuffered...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The whole producer loop needs to be enclosed in a goroutine to allow the main thread to start consuming the messages from the queue.

Otherwise the whole waitgroup was consumed without any message being read from the queue and writes were blocked as well because the queue is unbuffered...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants