mirror of
https://github.com/golang/go.git
synced 2024-11-22 05:40:42 +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
|
||||
|
||||
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
|
||||
for val := range values {
|
||||
go val.my_method()
|
||||
|
Loading…
Reference in New Issue
Block a user