Remove unused lock (#9710)

This commit is contained in:
zeripath 2020-01-11 19:06:39 +00:00 committed by GitHub
parent 0e53a16cca
commit f8ea50cc7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,7 @@ package queue
import ( import (
"context" "context"
"sync"
"time" "time"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
@ -33,6 +34,7 @@ type PersistableChannelQueueConfiguration struct {
type PersistableChannelQueue struct { type PersistableChannelQueue struct {
*ChannelQueue *ChannelQueue
delayedStarter delayedStarter
lock sync.Mutex
closed chan struct{} closed chan struct{}
} }

View file

@ -28,7 +28,6 @@ type WrappedQueueConfiguration struct {
} }
type delayedStarter struct { type delayedStarter struct {
lock sync.Mutex
internal Queue internal Queue
underlying Type underlying Type
cfg interface{} cfg interface{}
@ -89,6 +88,7 @@ func (q *delayedStarter) setInternal(atShutdown func(context.Context, func()), h
// WrappedQueue wraps a delayed starting queue // WrappedQueue wraps a delayed starting queue
type WrappedQueue struct { type WrappedQueue struct {
delayedStarter delayedStarter
lock sync.Mutex
handle HandlerFunc handle HandlerFunc
exemplar interface{} exemplar interface{}
channel chan Data channel chan Data