This library contains additional computation expressions for the task CE utilizing the Resumable Code introduced in F# 6.0.
ValueTask<'T>
- This utilizes .NET's ValueTask (which is essentially a Discriminated Union of 'Value | Task<'Value>
) for possibly better performance in synchronous scenarios. Similar to F#'s Task Expression
ColdTask<'T>
- Alias for unit -> Task<'T>
. Allows for lazy evaluation (also known as Cold) of the tasks, similar to F#'s Async being cold.
CancellableTask<'T>
- Alias for CancellationToken -> Task<'T>
. Allows for lazy evaluation (also known as Cold) of the tasks, similar to F#'s Async being cold. Additionally, allows for flowing a CancellationToken through the computation, similar to F#'s Async cancellation support.
CancellableValueTask<'T>
- Alias for CancellationToken -> ValueTask<'T>
. Allows for lazy evaluation (also known as Cold) of the tasks, similar to F#'s Async being cold. Additionally, allows for flowing a CancellationToken through the computation, similar to F#'s Async cancellation support.
ParallelAsync<'T>
- Utilizes the applicative syntax to allow parallel execution of Async<'T> expressions. See this discussion as to why this is a separate computation expression.
valueTask
computation expression. Until this PR is merged.dotnet add nuget IcedTasks