Skip to content

Use `TimeAmount` for any `timeout` command arguments

Nathan Harris requested to merge blocking-timeamount into master

Motivation:

The goal is to have a strong-typed API for type-safety in arbitrary values, such as trying to use Int to represent time - as '3' could mean any unit of time, leaving many places for errors and bugs.

Modifications:

Switch all current APIs that accept a timeout argument to use NIO.TimeAmount instead of a plain Int.

Result:

Developers will have an easier time reasoning about their own code as to what values might mean when working with timeouts in Redis APIs.

Merge request reports