src-cli: race conditions in campaignProgressPrinter
Created by: mrnugget
There are two race conditions in the campaignProgressPrinter:
- We found a workaround for the first one here: https://github.com/sourcegraph/src-cli/pull/389#issuecomment-730952822 But we should fix it properly.
- I discovered a second one:
campaignProgressPrinterreads and mutates its own state across multiple calls ofPrintStatuses. These calls can happen in separate goroutines, which might leak to concurrent accesses of the same data structures (and caused a panic for me locally)