1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
7 type MockMutex struct {
8 AllowLock chan struct{}
9 AllowUnlock chan struct{}
12 func NewMockMutex() *MockMutex {
14 AllowLock: make(chan struct{}),
15 AllowUnlock: make(chan struct{}),
19 // Lock waits for someone to send to AllowLock.
20 func (m *MockMutex) Lock() {
24 // Unlock waits for someone to send to AllowUnlock.
25 func (m *MockMutex) Unlock() {