Re: [go-nuts] How to be safe in Go?

2016-06-24 Thread Nick Pavlica
On Thursday, June 23, 2016 at 6:44:22 PM UTC-6, Caleb Spare wrote: > > > To see if the the > > race detector would find this potential bug for me, I ran the code with > the > > mutex(s) commented out with the -race flag on and didn't get a warning. > > Did you make some concurrent requests?

[go-nuts] How to be safe in Go?

2016-06-23 Thread Nick Pavlica
All, While learning Go from the book "The Go Programming Language", by Addison-Wesley I was working through an example and was taken back by how easy it is to cause a data race. The book states that each incoming request is run in a separate goroutine by the server so that it can handle mult