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

I assume `Go` would have to be Closeable and you'd still need the try-with-resources, right?


You don't need a try-with-resources, you can manually call close if you want, or has to work in a non-lexical scope.

But you often want the concurrently running threads to return some results, that try-with-resources is part of the structured concurrency that helps you with closing off a branching point, similarly to how we use while loops instead of gotos. `go` in itself corresponds to `goto` basically, with many of the same negatives.


Maybe you re-read my comment, check the signature of Go::go() and think again?




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

Search: