Hi Gophers, So I've run into a situation where my code would run for a rather long time (10minutes - ~1 hour). And I want to cancel it halfway sometimes. I know I can use channel/context can check for channel message to return early. But this requires explicitly checking for channel status and would introduce many messy code blocks. Is it feasible (and good) for me to listen to some signal and use panic to stop the execution once signal received?
Thanks! Frank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d8bb51be-4f21-4658-93a9-d0e197b9bdden%40googlegroups.com.