parent
4b6370c46d
commit
5b2e2d29ca
6 changed files with 13 additions and 2 deletions
5
vendor/gitea.com/lunny/levelqueue/queue.go
generated
vendored
5
vendor/gitea.com/lunny/levelqueue/queue.go
generated
vendored
|
@ -295,6 +295,11 @@ func (queue *Queue) LHandle(h func([]byte) error) error {
|
|||
|
||||
// Close closes the queue (and the underlying db is set to closeUnderlyingDB)
|
||||
func (queue *Queue) Close() error {
|
||||
queue.highLock.Lock()
|
||||
queue.lowLock.Lock()
|
||||
defer queue.highLock.Unlock()
|
||||
defer queue.lowLock.Unlock()
|
||||
|
||||
if !queue.closeUnderlyingDB {
|
||||
queue.db = nil
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue