mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	fix datarace on issue indexer queue (#9490)
This commit is contained in:
		@@ -21,8 +21,11 @@ type repoIndexerOperation struct {
 | 
			
		||||
 | 
			
		||||
var repoIndexerOperationQueue chan repoIndexerOperation
 | 
			
		||||
 | 
			
		||||
func initQueue(queueLength int) {
 | 
			
		||||
	repoIndexerOperationQueue = make(chan repoIndexerOperation, queueLength)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func processRepoIndexerOperationQueue(indexer Indexer) {
 | 
			
		||||
	repoIndexerOperationQueue = make(chan repoIndexerOperation, setting.Indexer.UpdateQueueLength)
 | 
			
		||||
	for {
 | 
			
		||||
		select {
 | 
			
		||||
		case op := <-repoIndexerOperationQueue:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user