Lock locks m. If the lock is already in use, the calling goroutine blocks until the mutex is available.
()
| 31 | // If the lock is already in use, the calling goroutine |
| 32 | // blocks until the mutex is available. |
| 33 | func (m *LoggingMutex) Lock() { |
| 34 | TracefCtx(m.ctx, KeyAll, "Before %s.Lock() %s", m.getName(), GetCallersName(1, true)) |
| 35 | m.Mutex.Lock() |
| 36 | TracefCtx(m.ctx, KeyAll, "After %s.Lock() %s", m.getName(), GetCallersName(1, true)) |
| 37 | } |
| 38 | |
| 39 | // Unlock unlocks m. |
| 40 | // It is a run-time error if m is not locked on entry to Unlock. |