In some cases walkFn is being called after the fastWalk function has returned. This often happens when an error was encountered early on in scanning directories with many entries. It is caused by fastWalk not waiting for its workers to complete their work. A sync.WaitGroup is used to wait for all workers to finish when the function returns. Updates golang/go#16399 Change-Id: I695d30c18e4878b789520b9d8a650f9688d896ac Reviewed-on: https://go-review.googlesource.com/40092 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
|---|---|---|
| .. | ||
| fastwalk.go | ||
| fastwalk_dirent_fileno.go | ||
| fastwalk_dirent_ino.go | ||
| fastwalk_portable.go | ||
| fastwalk_test.go | ||
| fastwalk_unix.go | ||
| fix.go | ||
| fix_test.go | ||
| imports.go | ||
| mkindex.go | ||
| mkstdlib.go | ||
| sortimports.go | ||
| zstdlib.go | ||