Skip to content

Commit 960ac36

Browse files
authored
Remove unused lock (#9709)
1 parent edd3177 commit 960ac36

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/queue/queue_disk_channel.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package queue
66

77
import (
88
"context"
9+
"sync"
910
"time"
1011

1112
"code.gitea.io/gitea/modules/log"
@@ -33,6 +34,7 @@ type PersistableChannelQueueConfiguration struct {
3334
type PersistableChannelQueue struct {
3435
*ChannelQueue
3536
delayedStarter
37+
lock sync.Mutex
3638
closed chan struct{}
3739
}
3840

modules/queue/queue_wrapped.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ type WrappedQueueConfiguration struct {
2828
}
2929

3030
type delayedStarter struct {
31-
lock sync.Mutex
3231
internal Queue
3332
underlying Type
3433
cfg interface{}
@@ -89,6 +88,7 @@ func (q *delayedStarter) setInternal(atShutdown func(context.Context, func()), h
8988
// WrappedQueue wraps a delayed starting queue
9089
type WrappedQueue struct {
9190
delayedStarter
91+
lock sync.Mutex
9292
handle HandlerFunc
9393
exemplar interface{}
9494
channel chan Data

0 commit comments

Comments
 (0)