func (l *locker) Unlock(k interface{}) {
	l.mu.Lock()
	m := l.m[k]
	m.mu.Unlock()
	m.ref--
	if m.ref == 0 {
		delete(l.m, k)
	}
	l.mu.Unlock()
}
Unlock unlocks a locker by unlocking, decreasing the ref count, and
(optionally) deleting
package reactive
import (
	"context"
	"errors"
	"sync"
	"time"
)
var (
	RetrySentinelError = errors.New("retry")
	WriteThenReadDelay = 200 * time.Millisecond
)
type locker struct {
	mu sync.Mutex
	m  map[interface{}]*lock
}
func newLocker() *locker {
	return &locker{
		m: make(map[interface{}]*lock),
	}
}
type lock struct {
	ref int
	mu  sync.Mutex
}
func (l *locker) Lock(k interface{}) {
	l.mu.Lock()
	m, ok := l.m[k]
	if !ok {
		m = new(lock)
		l.m[k] = m
	}
	m.ref++
	l.mu.Unlock()
	m.mu.Lock()
}