func newMultiLock(maxLock, maxWait int) *multiLock {
	m := &multiLock{
		maxLock:  maxLock,
		maxWait:  maxWait,
		queue:    list.New(),
		lock:     make(chan struct{}, 1),
		lockFull: make(chan struct{}, 1),
	}
	m.lock <- struct{}{}
	return m
}
newMultiLock creates a new multiLock with the provided max lock and wait counts.
package app
import (
	"container/list"
	"context"
	"sync"
	"github.com/pkg/errors"
)
var errQueueFull = errors.New("queue full")
type multiLock struct {
	queue *list.List
	lockCount int
	maxLock   int
	maxWait   int
	lock     chan struct{}
	lockFull chan struct{}
}