(key string)
| 42 | } |
| 43 | |
| 44 | func (m *mutexMap) trySharedLock(key string) bool { |
| 45 | if !m.getMutexAndAddRef(key).TryRLock() { // +checklocksignore |
| 46 | m.getMutexAndReleaseRef(key) |
| 47 | return false |
| 48 | } |
| 49 | |
| 50 | return true |
| 51 | } |
| 52 | |
| 53 | func (m *mutexMap) sharedUnlock(key string) { |
| 54 | m.getMutexAndReleaseRef(key).RUnlock() // +checklocksignore |