code: func NewRegulator(driver storagedriver.StorageDriver, limit uint64) storagedriver.StorageDriver {
  	return &regulator{
  		StorageDriver: driver,
  		Cond:          sync.NewCond(&sync.Mutex{}),
  		available:     limit,
  	}
  }
docs: // NewRegulator wraps the given driver and is used to regulate concurrent calls
  // to the given storage driver to a maximum of the given limit. This is useful
  // for storage drivers that would otherwise create an unbounded number of OS
  // threads if allowed to be called unregulated.