(ctx context.Context, storage Storage, lockKey string)
| 331 | } |
| 332 | |
| 333 | func releaseLock(ctx context.Context, storage Storage, lockKey string) error { |
| 334 | err := storage.Unlock(context.WithoutCancel(ctx), lockKey) |
| 335 | if err == nil { |
| 336 | locksMu.Lock() |
| 337 | delete(locks, lockKey) |
| 338 | locksMu.Unlock() |
| 339 | } |
| 340 | return err |
| 341 | } |
| 342 | |
| 343 | // locks stores a reference to all the current |
| 344 | // locks obtained by this process. |
no test coverage detected
searching dependent graphs…