1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Optimize reading big values

This commit is contained in:
Vladimir Mihailenco
2018-08-16 13:25:19 +03:00
parent 929bfb147c
commit 00de347403
6 changed files with 134 additions and 147 deletions

View File

@ -168,7 +168,7 @@ func perform(n int, cbs ...func(int)) {
}
func eventually(fn func() error, timeout time.Duration) error {
errCh := make(chan error)
errCh := make(chan error, 1)
done := make(chan struct{})
exit := make(chan struct{})
@ -202,7 +202,7 @@ func eventually(fn func() error, timeout time.Duration) error {
case err := <-errCh:
return err
default:
return fmt.Errorf("timeout after %s", timeout)
return fmt.Errorf("timeout after %s without an error", timeout)
}
}
}