Unlock unlocks the safe mutex.
()
| 32 | |
| 33 | // Unlock unlocks the safe mutex. |
| 34 | func (s *SafeMutex) Unlock() { |
| 35 | AssertTrue(atomic.AddInt32(&s.writer, -1) == 0) |
| 36 | s.m.Unlock() |
| 37 | } |
| 38 | |
| 39 | // AssertLock asserts whether the lock is being held. |
| 40 | func (s *SafeMutex) AssertLock() { |