Open andrewhowdencom opened 4 years ago
Use buffered channels by default (prevents blocking until buffer is full)
Reject calls that sit outside the buffer (select {} with default) rather than block, defer to retries & back off.
Keep a gague of buffer max and current count.
Rel: https://dave.cheney.net/2013/04/30/curious-channels Rel: https://blog.acolyer.org/2019/05/17/understanding-real-world-concurrency-bugs-in-go/
Use buffered channels by default (prevents blocking until buffer is full)
Reject calls that sit outside the buffer (select {} with default) rather than block, defer to retries & back off.
Keep a gague of buffer max and current count.
Rel: https://dave.cheney.net/2013/04/30/curious-channels Rel: https://blog.acolyer.org/2019/05/17/understanding-real-world-concurrency-bugs-in-go/