lig/ignore, lib/logger: Fix race and potential dead-locks when logging (#4821)

This commit is contained in:
Simon Frei
2018-03-17 16:49:12 +01:00
committed by Jakob Borg
parent 7872bfa173
commit 5520022766
2 changed files with 14 additions and 10 deletions

View File

@@ -239,6 +239,10 @@ func (m *Matcher) Patterns() []string {
return patterns
}
func (m *Matcher) String() string {
return fmt.Sprintf("Matcher/%v@%p", m.Patterns(), m)
}
func (m *Matcher) Hash() string {
m.mut.Lock()
defer m.mut.Unlock()