mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 23:06:32 +00:00
debc4a3a99
When the tomb is created with a canceled context, then the workers started via `t.Go` exist nearly immediately. Once for the first time all started goroutines have been stopped, it is not allowed to issue further calls to `t.Go`. This is a problem when the started goroutines exit immediately, as for example the first goroutine might already have stopped before starting the second one, which is not allowed as once the first goroutines has stopped no goroutines were running. To fix this race condition the startup and main task of the archiver now also run within a `t.Go` function. This also allows unifying the error handling as it is no longer necessary to distinguish between errors returned by the workers or the saveTree processing. The tomb now just returns the first error encountered, which should also be the most descriptive one. |
||
---|---|---|
.. | ||
archiver_test.go | ||
archiver_unix_test.go | ||
archiver_windows_test.go | ||
archiver.go | ||
blob_saver_test.go | ||
blob_saver.go | ||
buffer.go | ||
doc.go | ||
file_saver_test.go | ||
file_saver.go | ||
scanner_test.go | ||
scanner.go | ||
testing_test.go | ||
testing.go | ||
tree_saver_test.go | ||
tree_saver.go | ||
tree_test.go | ||
tree.go |