Correct several mistakes in the comments/doc for PollImmediate.

This commit is contained in:
Rob Leidle 2018-06-12 11:21:26 -07:00
parent 7e41ab4ed3
commit 6ce74e4548

View File

@ -230,13 +230,13 @@ func pollInternal(wait WaitFunc, condition ConditionFunc) error {
// PollImmediate tries a condition func until it returns true, an error, or the timeout // PollImmediate tries a condition func until it returns true, an error, or the timeout
// is reached. // is reached.
// //
// Poll always checks 'condition' before waiting for the interval. 'condition' // PollImmediate always checks 'condition' before waiting for the interval. 'condition'
// will always be invoked at least once. // will always be invoked at least once.
// //
// Some intervals may be missed if the condition takes too long or the time // Some intervals may be missed if the condition takes too long or the time
// window is too short. // window is too short.
// //
// If you want to Poll something forever, see PollInfinite. // If you want to immediately Poll something forever, see PollImmediateInfinite.
func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error { func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
return pollImmediateInternal(poller(interval, timeout), condition) return pollImmediateInternal(poller(interval, timeout), condition)
} }