Patch for concurrent iterator & others (onto v1.11.6) #386
@ -52,8 +52,9 @@ func StreamHandler(wr io.Writer, fmtr Format) Handler {
|
||||
func SyncHandler(h Handler) Handler {
|
||||
var mu sync.Mutex
|
||||
return FuncHandler(func(r *Record) error {
|
||||
defer mu.Unlock()
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
return h.Log(r)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user