mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Make WrappedQueues and PersistableChannelUniqueQueues Pausable (#18393)
Implements the Pausable interface on WrappedQueues and PersistableChannelUniqueQueues Reference #15928 Signed-off-by: Andrew Thornton art27@cantab.net
This commit is contained in:
		| @@ -57,14 +57,12 @@ func NewWorkerPool(handle HandlerFunc, config WorkerPoolConfiguration) *WorkerPo | ||||
| 	ctx, cancel := context.WithCancel(context.Background()) | ||||
|  | ||||
| 	dataChan := make(chan Data, config.QueueLength) | ||||
| 	resumed := make(chan struct{}) | ||||
| 	close(resumed) | ||||
| 	pool := &WorkerPool{ | ||||
| 		baseCtx:            ctx, | ||||
| 		baseCtxCancel:      cancel, | ||||
| 		batchLength:        config.BatchLength, | ||||
| 		dataChan:           dataChan, | ||||
| 		resumed:            resumed, | ||||
| 		resumed:            closedChan, | ||||
| 		paused:             make(chan struct{}), | ||||
| 		handle:             handle, | ||||
| 		blockTimeout:       config.BlockTimeout, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user