Skip to content

Commit

Permalink
Shutdown analysis queue (blevesearch#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
vdimir authored Oct 6, 2020
1 parent bffe7ea commit 3bb3c7b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ type configuration struct {
}

func (c *configuration) SetAnalysisQueueSize(n int) {
if c.analysisQueue != nil {
c.analysisQueue.Close()
}
c.analysisQueue = index.NewAnalysisQueue(n)
}

func (c *configuration) Shutdown() {
c.SetAnalysisQueueSize(0)
}

func newConfiguration() *configuration {
return &configuration{
Cache: registry.NewCache(),
Expand Down

0 comments on commit 3bb3c7b

Please sign in to comment.