etaty / rediscala

Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
Apache License 2.0
790 stars 142 forks source link

blpop with timeout < 1.0 blocks forever #24

Closed fsvehla closed 9 years ago

fsvehla commented 10 years ago

Redis’ BLPOP timeout option takes an integer.

If a timeout of < 1 second is specified for the RedisBlockingClient the Future is never returned.

etaty commented 10 years ago

http://www.redis.io/commands/blpop

The timeout argument is interpreted as an integer value specifying the maximum number of seconds to block. A timeout of zero can be used to block indefinitely.

When your timeout paremeter is a Duration of less than 1 second, rediscala will send a request with a timeout of 0 second.

I am not sure there is a solution to this. What's your use case ?

fsvehla commented 10 years ago

It was a misunderstanding on how blpop works with time intervals that are not an Integer. Maybe it would make sense not to accept them? I think this can be closed though.