lib/model: Progress emitter network operations dont need to be blocking (#6589)
* lib/model: Progress emitter network operations dont need to be blocking * Do sends outside of the lock
This commit is contained in:
@@ -461,6 +461,10 @@ func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
|
||||
func sendMsgs(p *ProgressEmitter) {
|
||||
p.mut.Lock()
|
||||
defer p.mut.Unlock()
|
||||
p.sendDownloadProgressMessagesLocked(context.Background())
|
||||
updates := p.computeProgressUpdates()
|
||||
p.mut.Unlock()
|
||||
ctx := context.Background()
|
||||
for _, update := range updates {
|
||||
update.send(ctx)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user