News for hackers. Stuff that matters.
Re:Libdill: Structured concurrency in C by rumcajz on Saturday June 04, 2016 @11:38AM (#11836685)
To me, the trick with closing the resource sounds like a hack.

Imagine you wanted to generalise it: We have a goroutine that may use some resources: sockets, files, keyboard, screen etc. To shut it down you cut it off from all those resources and hope that it will die.

It sounds wrong somehow.

Re:Libdill: Structured concurrency in C by jerf on Sunday June 05, 2016 @07:15PM (#11843662)
I'd agree it was a hack if it were ill-defined, but I don't think it is. I don't think Go introduced that trick. In many cases you have to write your code to be able to deal with the resource being unavailable at any moment anyhow, especially networks, where Go is on its home turf. (As I've said more than once, the farther you are from writing something that looks like a network server, the less happy you will be with Go.)