mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08: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:
		@@ -105,7 +105,7 @@ func (q *WrappedUniqueQueue) Push(data Data) error {
 | 
			
		||||
// PushFunc will push the data to the internal channel checking it against the exemplar
 | 
			
		||||
func (q *WrappedUniqueQueue) PushFunc(data Data, fn func() error) error {
 | 
			
		||||
	if !assignableTo(data, q.exemplar) {
 | 
			
		||||
		return fmt.Errorf("Unable to assign data: %v to same type as exemplar: %v in %s", data, q.exemplar, q.name)
 | 
			
		||||
		return fmt.Errorf("unable to assign data: %v to same type as exemplar: %v in %s", data, q.exemplar, q.name)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	q.tlock.Lock()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user