>
> My thought then is that access to reads and writes on the req.Body must
> be serialized to avoid a race condition.
>
Could you elaborate on how you concluded that? Preserves, does not mean
'takes ownership' as I understand.
Using a mutex for this prevented the race conditions.
But this
> There are 1000 go routines started here, each of them using the same
> customReader. This where the data race comes from.
I think you are mistaken. I create customReader for EACH of the goroutines.
Notice that in every loop I pass it to the goroutine func.
And if you want you can remove t
I've been playing with server which redirects requests but then I noticed
weird races.
What is odd that if these races are expected it would mean that using
`*File` in `req.Body`, for requests which are redirected, is not safe -
this is because we have races between `Read` and `Close`.
I've run