mirror of
https://github.com/golang/go
synced 2024-11-18 11:04:42 -07:00
cmd/godoc: start RunIndexer synchronously when index is present
Until the index is read completely, search requests will serve an "indexing in progress" message. We make this synchronous to allow the index to be read completely before starting to serve requests. Fixes golang/go#24965 Change-Id: I6b094374a9c5cc923f0582107dde2b652e64fd96 Reviewed-on: https://go-review.googlesource.com/c/148998 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
5f9a541373
commit
c340431777
@ -84,7 +84,11 @@ func main() {
|
||||
}
|
||||
corpus.IndexDirectory = indexDirectoryDefault
|
||||
corpus.InitVersionInfo()
|
||||
if indexFilenames != "" {
|
||||
corpus.RunIndexer()
|
||||
} else {
|
||||
go corpus.RunIndexer()
|
||||
}
|
||||
|
||||
pres = godoc.NewPresentation(corpus)
|
||||
pres.TabWidth = 8
|
||||
|
Loading…
Reference in New Issue
Block a user