4 ms·
Several things about channels. The first is a random correction to a common meme. Channels can be created buffered or unbuffered. If they are unbuffered, the
by btilly 17y ago
Several things about channels.
The first is a random correction to a common meme. Channels can be created buffered or unbuffered. If they are unbuffered, then sender blocks. If buffereed, then sender blocks when the buffer is full. Buffering can improve performance significantly.
Secondly when you set up complicated messes of goroutines talking over channels it is easy to get deadlocks. There is a deadlock detection mechanism, but I don't have any details beyond knowing that some people have run into it.
Thirdly am I the only person in the world who looks at the channel mechanism and thinks how naturally it maps onto a capability style security system? I've pointed that out a few times and nobody seems to bite on it. Odd.
- jerf 17y ago"Thirdly am I the only person in the world who looks at the channel mechanism and thinks how naturally it maps onto a capability style security system?" I'm thinking that "people interested and excited about capabilities" - "people who didn't realize channels can be used that way" is probably a fairly small number. I saw one of your earlier comments to that effect, but it wasn't very surprising to me, for instance.
- btilly 17y agoI realized that they could be used that way immediately. My excitement is over the potential for the approach becoming more mainstream, and not over being surprised that it was possible.