func Acquire(spec Spec) (Releaser, error) {
	if err := spec.Validate(); err != nil {
		return nil, errors.Trace(err)
	}

	var timeout <-chan time.Time
	if spec.Timeout > 0 {
		timeout = spec.Clock.After(spec.Timeout)
	}

	return acquire(spec, timeout)
}
// Acquire will attempt to acquire the named mutex. If the Timout value
// is hit, ErrTimeout is returned. If the Cancel channel is signalled,
// ErrCancelled is returned.
Acquire will attempt to acquire the named mutex. If the Timout value
is hit, ErrTimeout is returned. If the Cancel channel is signalled,
ErrCancelled is returned.
// Acquire will attempt to acquire the named mutex . If the Timout value // is hit ErrTimeout is returned . If the Cancel channel is signalled // ErrCancelled is returned .
func Acquire(spec Spec) (Releaser, error) {
	if err := spec.Validate(); err != nil {
		return nil, errors.Trace(err)
	}
	var timeout <-chan time.Time
	if spec.Timeout > 0 {
		timeout = spec.Clock.After(spec.Timeout)
	}
	return acquire(spec, timeout)
}
func Acquire ( spec Spec ) ( Releaser , error ) { if err := spec . Validate ( ) ; err != nil { return nil , errors . Trace ( err ) } var timeout <- chan time . Time if spec . Timeout > 0 { timeout = spec . Clock . After ( spec . Timeout ) } return acquire ( spec , timeout ) }
Acquire will attempt to acquire the named mutex.
Acquire will attempt to acquire the named mutex .