Hello, All the material about Golang Context on web confirm that passing Context to goroutines is a-ok and encouraged. I didn't find much information on whether passing Context across channel is ok or not.
In our use-case, we have a worker pool which is setup to allow a finite number of goroutines to process the work. The work items are fed using a go-channel. We can think of each work-item as a separate request (kafka event in our case). We create a new Context for each of these incoming event and send them across channel to the worker pool. The question is whether including Context as part of this work-item is an ok thing to do or not. It seems to be working fine, though we are curious if there is any downside, and if so what would be a better design. Thanks for your time, -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/527f2f43-ae7b-4a9d-899f-6032cec95481n%40googlegroups.com.