Skip to content

Defer channel closing outside repository.RunWorkers#3022

Merged
MichaelEischer merged 1 commit intorestic:masterfrom
greatroar:refactor-runworkers
Oct 14, 2020
Merged

Defer channel closing outside repository.RunWorkers#3022
MichaelEischer merged 1 commit intorestic:masterfrom
greatroar:refactor-runworkers

Conversation

@greatroar
Copy link
Copy Markdown
Contributor

@greatroar greatroar commented Oct 14, 2020

What does this PR change? What problem does it solve?

This is a tiny refactor that replaces a callback by a defer'd call. It's mostly stylistic, but it might make some stack traces shorter: when a worker goroutine panics, other goroutines have a chance of exiting, so their stack no longer needs to be reported

Was the change discussed in an issue or in the forum before?

Can be considered a follow-up to #2560.

Checklist

@greatroar
Copy link
Copy Markdown
Contributor Author

greatroar commented Oct 14, 2020

I just noticed that this will likely give a merge conflict with #3006.

Copy link
Copy Markdown
Member

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We've finally managed to remove almost all code from RunWorkers ^^

@MichaelEischer MichaelEischer merged commit ce87fbd into restic:master Oct 14, 2020
@greatroar greatroar deleted the refactor-runworkers branch October 15, 2020 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants