extend optional_timeout usage to deadline