Comment

Comment by gilgad13

I agree, with the addition that closing an unbuffered `<-chan struct{}` is a good way to do broadcast notifications (a. la. the context package).

As evidence that channels should be used rarely, and only in small scopes, consider the number of places chan is used in the standard library.

parent gilgad13 4 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton