Closed harrisonturton closed 5 years ago
@michaelklishin if you have a second to review this it would be appreciated.
I'd like to make some edits (these docs use some non-standard and potentially confusing terminology) but they can happen after the merge. Thank you.
@harrisonturton can you link to the online examples that leaked goroutines?
@lukebakken @harrisonturton This example has a number of data races, writes from handleReconnect and reads from other methods. Can you please make it output something and test the output so data races can be caught from CI?
This adds an example
Queue
implementation. It features:I could add auto-ack stuff through
Consume
function with afunc(d Delivery) bool
handler function, like:But this makes it harder to use the queue, especially with complex client logic. Manually acking outgoing messages isn't difficult, so I left it.
I had some trouble with GoDoc. I simply want to display the
Queue
file, but I was forced to include anExample()
function. This is a bit annoying, but it works.Happy to refactor is need be. I know there is an
_examples
directory, but GoDoc wouldn't let me put the package-wide example there.