From f8ea50cc7a8c7d98a1a4089070905f6cbe254e2f Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 11 Jan 2020 19:06:39 +0000 Subject: [PATCH] Remove unused lock (#9710) --- modules/queue/queue_disk_channel.go | 2 ++ modules/queue/queue_wrapped.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/queue/queue_disk_channel.go b/modules/queue/queue_disk_channel.go index 895c8ce918..6bb5a1be97 100644 --- a/modules/queue/queue_disk_channel.go +++ b/modules/queue/queue_disk_channel.go @@ -6,6 +6,7 @@ package queue import ( "context" + "sync" "time" "code.gitea.io/gitea/modules/log" @@ -33,6 +34,7 @@ type PersistableChannelQueueConfiguration struct { type PersistableChannelQueue struct { *ChannelQueue delayedStarter + lock sync.Mutex closed chan struct{} } diff --git a/modules/queue/queue_wrapped.go b/modules/queue/queue_wrapped.go index 0e948bae28..c52e6e4673 100644 --- a/modules/queue/queue_wrapped.go +++ b/modules/queue/queue_wrapped.go @@ -28,7 +28,6 @@ type WrappedQueueConfiguration struct { } type delayedStarter struct { - lock sync.Mutex internal Queue underlying Type cfg interface{} @@ -89,6 +88,7 @@ func (q *delayedStarter) setInternal(atShutdown func(context.Context, func()), h // WrappedQueue wraps a delayed starting queue type WrappedQueue struct { delayedStarter + lock sync.Mutex handle HandlerFunc exemplar interface{} channel chan Data