summaryrefslogtreecommitdiffstats
path: root/modules/queue
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-11 19:06:35 +0000
committerGitHub <noreply@github.com>2020-01-11 19:06:35 +0000
commit960ac3609962b33c6937ef9de473122dff98a523 (patch)
tree934561da287c4a2856f7a3c750803dc16c423959 /modules/queue
parentedd31770aa10207d91405a98c9b97ce14db7b302 (diff)
downloadgitea-960ac3609962b33c6937ef9de473122dff98a523.tar.gz
gitea-960ac3609962b33c6937ef9de473122dff98a523.zip
Remove unused lock (#9709)
Diffstat (limited to 'modules/queue')
-rw-r--r--modules/queue/queue_disk_channel.go2
-rw-r--r--modules/queue/queue_wrapped.go2
2 files changed, 3 insertions, 1 deletions
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