4 ms·
One pattern for long running channels is to have another polling / heartbeat channel on the goroutine. This is often redundant as you can achieve the basic func
by Intermernet 2y ago
One pattern for long running channels is to have another polling / heartbeat channel on the goroutine. This is often redundant as you can achieve the basic functionality with contexts, but it can be useful when you need to implement some reporting, or you need to implement more advanced load balancing or back off strategies.