release worker tracker lock when call cb func

This commit is contained in:
Jerry 2022-02-28 16:55:04 +08:00
parent 6d0066eafa
commit 8f95cd4149

View File

@ -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
}