On Friday, 15 October 2021 at 03:54:17 UTC, Ali Çehreli wrote:
On 10/14/21 8:35 PM, jfondren wrote:The book, "The Go Programming Language" has this simple goroutine example:Here is one that uses receiveTimeout and OwnerTerminated:
Very nice, replacing Thread.sleep with receiveTimeout and getting graceful interruption for free. This also doesn't crash.