getName returns the name of the mutex for logging.
()
| 62 | |
| 63 | // getName returns the name of the mutex for logging. |
| 64 | func (m *LoggingMutex) getName() string { |
| 65 | if m.name != "" { |
| 66 | return m.name |
| 67 | } |
| 68 | return "LoggingMutex" |
| 69 | } |
| 70 | |
| 71 | // LoggingRWMutex is a normal sync.RWMutex that logs before and after each operation. Recommended for dev-time debugging only. |
| 72 | type LoggingRWMutex struct { |