Merge pull request #8206 from firesWu/fix/optimize-worker-tracker-lock
release worker tracker lock when call cb func
This commit is contained in:
commit
e1ef1b759e
3
extern/sector-storage/worker_tracked.go
vendored
3
extern/sector-storage/worker_tracked.go
vendored
@ -98,7 +98,10 @@ func (wt *workTracker) track(ctx context.Context, ready chan struct{}, wid stori
|
||||
wt.lk.Lock()
|
||||
delete(wt.prepared, prepID)
|
||||
}
|
||||
|
||||
wt.lk.Unlock()
|
||||
callID, err := cb()
|
||||
wt.lk.Lock()
|
||||
if err != nil {
|
||||
return callID, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user