mirror of
https://github.com/restic/restic.git
synced 2024-12-26 01:37:12 +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.go | ||
archiver_test.go | ||
archiver_unix_test.go | ||
archiver_windows_test.go | ||
blob_saver.go | ||
blob_saver_test.go | ||
buffer.go | ||
doc.go | ||
file_saver.go | ||
file_saver_test.go | ||
scanner.go | ||
scanner_test.go | ||
testing.go | ||
testing_test.go | ||
tree.go | ||
tree_saver.go | ||
tree_saver_test.go | ||
tree_test.go |