Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yup. That’s because cancellation isn’t native, but part of the context object and requires cooperation. In a language where goroutine switching is preemptive rather than cooperative, I find it odd to have cooperative cancellation, until I realize that Go doesn’t have exceptions and probably will never have them.
 help



exactly - once you accept go has no exceptions, context cancellation is basically the least bad way to tell a goroutine to stop.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: