mirror of
https://github.com/octoleo/restic.git
synced 2025-01-03 07:12:28 +00:00
Merge pull request #3959 from MichaelEischer/buffered-backup-progress
backup: Use buffered channels to collect backup status
This commit is contained in:
commit
cea7191995
@ -73,10 +73,13 @@ func NewProgress(printer ProgressPrinter) *Progress {
|
|||||||
MinUpdatePause: time.Second / 60,
|
MinUpdatePause: time.Second / 60,
|
||||||
start: time.Now(),
|
start: time.Now(),
|
||||||
|
|
||||||
totalCh: make(chan Counter),
|
// use buffered channels for the information used to update the status
|
||||||
processedCh: make(chan Counter),
|
// the shutdown of the `Run()` method is somewhat racy, but won't affect
|
||||||
|
// the final backup statistics
|
||||||
|
totalCh: make(chan Counter, 100),
|
||||||
|
processedCh: make(chan Counter, 100),
|
||||||
errCh: make(chan struct{}),
|
errCh: make(chan struct{}),
|
||||||
workerCh: make(chan fileWorkerMessage),
|
workerCh: make(chan fileWorkerMessage, 100),
|
||||||
closed: make(chan struct{}),
|
closed: make(chan struct{}),
|
||||||
|
|
||||||
summary: &Summary{},
|
summary: &Summary{},
|
||||||
|
Loading…
Reference in New Issue
Block a user