aisk / rust-memcache

memcache client for rust
MIT License
132 stars 41 forks source link

Add connect_timeout option and allow for fractional timeouts #135

Closed plicease closed 1 year ago

plicease commented 1 year ago

This includes #133 and adds what I proposed in #134 to use f64 instead of i64 to get fractional timeouts. It still has #133's awkwardness, which I am happy to correct with guidance.

Using the set_read_timeout and set_write_timeout you could use a millisecond duration, but there is no such interface for the connect timeout, and I think this would be a more consistent approach, while still being backward compatible.

aisk commented 1 year ago

LGTM, but there was conflict that should be resolved.

plicease commented 1 year ago

LGTM, but there was conflict that should be resolved.

Right, this originally included the commit from #133 , in case you only wanted to merge that :) I've force pushed with just the commit that adds the fractional timeouts.