I'm running into a deadlock issue when i'm trying to implement a worker
pattern using buffered channels & sync waitgroup as was advised in a
similar problem in an older post<https://groups.google.com/d/msg/golang-nuts/Kbh_QjIkU7M/oqu0tJHCryUJ>that i came across via search.
Here is the core Code on Go Playground <http://play.golang.org/p/6QZ0CA77lE> which
replicates the problem. I'm basically trying to start 3 worker goroutines
which will pull tasks from a buffered channel, do some time/disk intensive
operation (read from a file & take some actions on the content - simulating
here with sleep) and print the results.
This deadlocks but i'm not clear what i'm doing wrong.
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.