Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

leaping leopard

Compare
Choose a tag to compare
@nathany nathany released this 29 Jul 18:00
· 18 commits to master since this release

push

Ensure all responses are handled -- not just received.

When using a Queue to push notifications concurrently, previous versions had an internal WaitGroup that ensured all responses were sent (and therefore received) before closing channels and shutting down workers.

The problem was a program could terminate after the last response was sent but before it was finished being processed. To remedy this situation, you are now responsible for maintaining a WaitGroup in the calling code. The queue.Wait() method has been replaced with queue.Close() which should only be called after all responses are handled.

See the README for further details.

(thanks to @roma86 for reporting the issue, #74)