From 6102f9c752b020bb27712452c28b0d1679d621c8 Mon Sep 17 00:00:00 2001 From: Xavi Ramirez Date: Thu, 10 Aug 2017 19:56:17 +0000 Subject: [PATCH] Added comment to why a channel is taking a channel. --- batchconsumer/batchermanager.go | 3 ++- batchconsumer/checkpointmanager.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/batchconsumer/batchermanager.go b/batchconsumer/batchermanager.go index b8b26f6..620d222 100644 --- a/batchconsumer/batchermanager.go +++ b/batchconsumer/batchermanager.go @@ -46,7 +46,8 @@ func newBatcherManager( batchMsg: make(chan tagMsgPair), lastIgnored: make(chan kcl.SequencePair), lastProcessed: make(chan kcl.SequencePair), - shutdown: make(chan chan<- struct{}), + // shutdown chan takes "done" channel to signal when batchermanager is done shutting down + shutdown: make(chan chan<- struct{}), } bm.startMessageHandler(bm.batchMsg, bm.lastIgnored, bm.lastProcessed, bm.shutdown) diff --git a/batchconsumer/checkpointmanager.go b/batchconsumer/checkpointmanager.go index a76fd0c..8ff4c45 100644 --- a/batchconsumer/checkpointmanager.go +++ b/batchconsumer/checkpointmanager.go @@ -15,7 +15,8 @@ type checkpointManager struct { checkpointFreq time.Duration checkpoint chan kcl.SequencePair - shutdown chan chan<- struct{} + // shutdown chan takes "done" channel to signal when checkpointManager is done shutting down + shutdown chan chan<- struct{} } func newCheckpointManager(