How to run the maximum number of goroutines
问题 The code is like this: func find(start int, end int){ for i := start; i < end ; i++ { // Do something... } } func main() { // Do something... // For example, I know: len = 1500 // and run max goroutine are 3 // will be go find(0, 500) go find(500, 1000) go find(1000, 1500) // Do something... } That is when I know in advance the maximum threads of goroutines and the length of "length". But if I do not know how many threads can run at goroutine, and the length of "length". Is there any way to