package semaphore

import "golang.org/x/sync/semaphore"

const defaultSize = 5

func New(parallel int) *semaphore.Weighted {
	if parallel == 0 {
		parallel = defaultSize
	}
	return semaphore.NewWeighted(int64(parallel))
}
