[go-nuts] Re: Idiomatic way of handling http requests in separate goroutines

2016-12-12 Thread Pablo Rozas-Larraondo
In case someone arrives here with the same question I'm going to post a simple example that does what Tamás suggested a few days ago. Use context to block on .Done() and pass the responseWriter as a context Value. Please comment if passing the responseWriter as a context value is not considered

[go-nuts] Re: Idiomatic way of handling http requests in separate goroutines

2016-12-08 Thread Pablo Rozas-Larraondo
Thank you Tamás, I like the concept of blocking on select in the handler until a worker closes the channel. I don't know why but every time I use a WaitGroup I have the impression that the same thing can be done better. I'll try to implement it with the context library first as I'm very intri