Description:
Introduce support for timeouts and external cancellation signals in retry logic. This prevents retries from continuing indefinitely when an operation should be aborted.
Acceptance Criteria:
- Optional timeout argument: stop retrying after N seconds.
- Support for a cancellation token/event (or similar pattern).
- Tests for both timeout and cancellation cases.
Description:
Introduce support for timeouts and external cancellation signals in retry logic. This prevents retries from continuing indefinitely when an operation should be aborted.
Acceptance Criteria: