diff --git a/examples/stateful-goroutines/stateful-goroutines.go b/examples/stateful-goroutines/stateful-goroutines.go index 0b7d95c..24ba0e5 100644 --- a/examples/stateful-goroutines/stateful-goroutines.go +++ b/examples/stateful-goroutines/stateful-goroutines.go @@ -45,15 +45,15 @@ func main() { reads := make(chan *readOp) writes := make(chan *writeOp) - // Here is the goroutine that owns the `state`, which - // is a map as in the previous example, but is held - // internally so all changes are handled by this function. - // This goroutine repeatedly selects on the `reads` and - // `writes` channels, responding to requests as they - // arrive. A response is executed by first performing - // the requested operation and then sending a value - // on the response channel `resp` to indicate success - // (and the desired value in the case of `reads`). + // Here is the goroutine that owns the `state`, which + // is a map as in the previous example but now private + // to the stateful goroutine. This goroutine repeatedly + // selects on the `reads` and `writes` channels, + // responding to requests as they arrive. A response + // is executed by first performing the requested + // operation and then sending a value on the response + // channel `resp` to indicate success (and the desired + // value in the case of `reads`). go func() { var state = make(map[int]int)