diff options
author | 6543 <6543@obermui.de> | 2021-02-10 22:28:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 21:28:32 +0000 |
commit | ac97ea573c1b10d03e72775e8f74b9fe5453bfc8 (patch) | |
tree | 99fa7488782a2a6c4362c49e4cdf04594c662ca3 /modules/queue/queue_bytefifo.go | |
parent | 4cffc46f651205b9d7eb0b1df46dd6117c6d95e9 (diff) | |
download | gitea-ac97ea573c1b10d03e72775e8f74b9fe5453bfc8.tar.gz gitea-ac97ea573c1b10d03e72775e8f74b9fe5453bfc8.zip |
[Vendor] Update go-redis to v8.5.0 (#13749)
* Update go-redis to v8.4.0
* github.com/go-redis/redis/v8 v8.4.0 -> v8.5.0
* Apply suggestions from code review
Co-authored-by: zeripath <art27@cantab.net>
* TODO
* Use the Queue termination channel as the default context for pushes
Signed-off-by: Andrew Thornton <art27@cantab.net>
* missed one
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/queue/queue_bytefifo.go')
-rw-r--r-- | modules/queue/queue_bytefifo.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/queue/queue_bytefifo.go b/modules/queue/queue_bytefifo.go index cad258bda8..4bb7bbf2b1 100644 --- a/modules/queue/queue_bytefifo.go +++ b/modules/queue/queue_bytefifo.go @@ -163,6 +163,11 @@ func (q *ByteFIFOQueue) Shutdown() { log.Debug("%s: %s Shutdown", q.typ, q.name) } +// IsShutdown returns a channel which is closed when this Queue is shutdown +func (q *ByteFIFOQueue) IsShutdown() <-chan struct{} { + return q.closed +} + // Terminate this queue and close the queue func (q *ByteFIFOQueue) Terminate() { log.Trace("%s: %s Terminating", q.typ, q.name) @@ -185,6 +190,11 @@ func (q *ByteFIFOQueue) Terminate() { log.Debug("%s: %s Terminated", q.typ, q.name) } +// IsTerminated returns a channel which is closed when this Queue is terminated +func (q *ByteFIFOQueue) IsTerminated() <-chan struct{} { + return q.terminated +} + var _ (UniqueQueue) = &ByteFIFOUniqueQueue{} // ByteFIFOUniqueQueue represents a UniqueQueue formed from a UniqueByteFifo |