As pointed out in #18580, timeout's implementation assumes that exceptions will be handled. Document and assert this precondition.
timeout
Fixes #18580.