Skip to content
  • Carl Lerche's avatar
    Introduce `Timeout` and deprecate `Deadline`. (#558) · 8bf2e9ae
    Carl Lerche authored
    This patch introduces `Timeout`. This new type allows setting a timeout
    both using a duration and an instant. Given this overlap with
    `Deadline`, `Deadline` is deprecated.
    
    In addition to supporting future timeouts, the `Timeout` combinator is
    able to provide timeout functionality to streams. It does this by
    applying a duration based timeout to each item being yielded.
    
    The main reason for introducing `Timeout` is that a deadline approach
    does not work with streams. Since `Timeout` needed to be introduced
    anyway, keeping `Deadline` around does not make sense.
    8bf2e9ae