Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/media/timeout strategy happy path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/timeout strategy unhappy path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions docs/strategies/timeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,54 @@ HttpResponseMessage httpResponse = await pipeline.ExecuteAsync(
| `Timeout` | 30 seconds | The default timeout used by the strategy. |
| `TimeoutGenerator` | `null` | Generates the timeout for a given execution. |
| `OnTimeout` | `null` | Event that is raised when timeout occurs. |

## Diagrams

### Happy path sequence diagram

![Timeout strategy - happy path](../media/timeout%20strategy%20happy%20path.png)

<!-- ```mermaid
sequenceDiagram
actor C as Caller
participant P as Pipeline
participant T as Timeout
participant DM as DecoratedMethod

C->>P: Calls ExecuteAsync
P->>T: Calls ExecuteCore
T->>+DM: Invokes
DM->>DM: Performs <br/>long-running <br/>operation
DM->>-T: Returns result
T->>P: Returns result
P->>C: Returns result
``` -->

### Unhappy path sequence diagram

![Timeout strategy unhappy path](../media/timeout%20strategy%20unhappy%20path.png)

<!---
```mermaid
sequenceDiagram
actor C as Caller
participant P as Pipeline
participant T as Timeout
participant DM as DecoratedMethod

C->>P: Calls ExecuteAsync
P->>T: Calls ExecuteCore
T->>+DM: Invokes
activate T
activate DM
DM->>DM: Performs <br/>long-running <br/>operation
T->T: Times out
deactivate T
T->>DM: Propagates cancellation
deactivate DM
T->>P: Throws <br/>TimeoutRejectedException
P->>C: Propagates exception
```
-->

---