Timeout Module
Timeout combinators — enforce deadlines on async operations.
Functions and values
| Function or value |
Description
|
||
Full Usage:
Timeout.after duration work
Parameters:
TimeSpan
-
Maximum time allowed before the operation is cancelled.
work : CancellationToken -> Task<'T>
-
Async work that receives a cancellation token linked to the deadline.
Returns: Task<'T>
|
Runs work with a hard deadline. Throws TimeoutException if exceeded. Propagates CancellationToken so underlying work can cooperatively stop.
|
||
Full Usage:
Timeout.afterLinked duration parentCt work
Parameters:
TimeSpan
parentCt : CancellationToken
work : CancellationToken -> Task<'T>
Returns: Task<'T>
|
Runs work with a deadline, linked to a parent cancellation token. Maximum time allowed before the operation is cancelled. Parent token that can also trigger cancellation. Async work that receives a cancellation token linked to both the deadline and the parent token.
|
TDesu.FSharp