Skip to content

Channels #57

Answered by benbjohnson
OLUWAMUYIWA asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks! I'm glad to hear it's been helpful. As for channels, I generally don't use them from an application development perspective. I find they're difficult to use and clean up from easily and there's usually better concurrency constructs at the application level. I do use them sometimes for lower level code but many times I'll just use a mutex or wait group or some of the constructs in the sync package.

For application development, I find I use errgroup a lot. I find a lot of concurrency at the application level is for fanning out calls in parallel and errgroup fits that pretty well. Channels can also be used for throttling but there's other higher level constructs like semaphore or a t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by benbjohnson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants