Fix maxTimes comment to clarify infinity waits and add a PollInfinite function.

This commit is contained in:
jayunit100
2015-07-29 17:14:18 -04:00
parent c5bffaaf31
commit 3b295ee342
2 changed files with 9 additions and 4 deletions

View File

@@ -91,9 +91,10 @@ func TestPollForever(t *testing.T) {
}
return false, nil
})
if err := Poll(time.Microsecond, 0, f); err != nil {
if err := PollInfinite(time.Microsecond, f); err != nil {
t.Fatalf("unexpected error %v", err)
}
close(ch)
complete <- struct{}{}
}()