mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Can someone double check that code from first example really has some problems?
parent
e800242a66
commit
917f086adf
@ -6,7 +6,7 @@ When new programmers start using Go or when old Go programmers start using a new
|
|||||||
|
|
||||||
# Using goroutines on loop iterator variables
|
# Using goroutines on loop iterator variables
|
||||||
|
|
||||||
When iterating in Go, one might also be tempted to use goroutines to process data in parallel. For example, you might write the following code:
|
When iterating in Go, one might also be tempted to use goroutines to process data in parallel. For example, you might write the following code (TODO: What is wrong with example from the following code?):
|
||||||
```go
|
```go
|
||||||
for val := range values {
|
for val := range values {
|
||||||
go val.my_method()
|
go val.my_method()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user