20735: Update to go 1.20.
[arvados.git] / services / keepstore / work_queue.go
index 27646ad3d8d98c9b58e8693c079e3b40a14d1e1e..be3d118ff0d9f21384153ccf03b3696cfe2af613 100644 (file)
@@ -1,4 +1,8 @@
-package main
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+package keepstore
 
 /* A WorkQueue is an asynchronous thread-safe queue manager.  It
    provides a channel from which items can be read off the queue, and
@@ -104,7 +108,6 @@ type WorkQueueStatus struct {
 }
 
 // NewWorkQueue returns a new empty WorkQueue.
-//
 func NewWorkQueue() *WorkQueue {
        nextItem := make(chan interface{})
        reportDone := make(chan struct{})
@@ -181,7 +184,6 @@ func NewWorkQueue() *WorkQueue {
 // and starts giving workers items from the given list. After giving
 // it to ReplaceQueue, the caller must not read or write the given
 // list.
-//
 func (b *WorkQueue) ReplaceQueue(list *list.List) {
        b.newlist <- list
 }
@@ -192,14 +194,12 @@ func (b *WorkQueue) ReplaceQueue(list *list.List) {
 //
 // After Close, Status will return correct values, NextItem will be
 // closed, and ReplaceQueue will panic.
-//
 func (b *WorkQueue) Close() {
        close(b.newlist)
 }
 
 // Status returns an up-to-date WorkQueueStatus reflecting the current
 // queue status.
-//
 func (b *WorkQueue) Status() WorkQueueStatus {
        // If the channel is closed, we get the nil value of
        // WorkQueueStatus, which is an accurate description of a