From 7f4a11ba3e1b1a98dc9a2ba309c81d0ecdfce14c Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Sun, 5 Nov 2023 19:23:53 -0500 Subject: [PATCH] cleanup docs --- docsSrc/index.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docsSrc/index.md b/docsSrc/index.md index 4e55c91..6f6656f 100644 --- a/docsSrc/index.md +++ b/docsSrc/index.md @@ -4,16 +4,34 @@ This library contains additional [computation expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions) for the [task CE](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/task-expressions) utilizing the [Resumable Code](https://github.com/fsharp/fslang-design/blob/main/FSharp-6.0/FS-1087-resumable-code.md) introduced [in F# 6.0](https://devblogs.microsoft.com/dotnet/whats-new-in-fsharp-6/#making-f-faster-and-more-interopable-with-task). - `ValueTask<'T>` - This utilizes .NET's [ValueTask](https://devblogs.microsoft.com/dotnet/understanding-the-whys-whats-and-whens-of-valuetask/) (which is essentially a [Discriminated Union](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/discriminated-unions) of `'Value | Task<'Value>`) for possibly better performance in synchronous scenarios. Similar to [F#'s Task Expression](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/task-expressions) + - `valueTask` + - `valueTaskUnit` + - `poolingValueTask` - `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](https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/async#core-concepts-of-async). + - `coldTask` - `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](https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/async#core-concepts-of-async). Additionally, allows for flowing a [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-6.0) through the computation, similar to [F#'s Async cancellation support](http://tomasp.net/blog/async-csharp-differences.aspx/#:~:text=In%20F%23%20asynchronous%20workflows%2C%20the,and%20everything%20will%20work%20automatically). + - `cancellableTask` + - `cancellableBackgroundTask` - `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](https://docs.microsoft.com/en-us/dotnet/fsharp/tutorials/async#core-concepts-of-async). Additionally, allows for flowing a [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken?view=net-6.0) through the computation, similar to [F#'s Async cancellation support](http://tomasp.net/blog/async-csharp-differences.aspx/#:~:text=In%20F%23%20asynchronous%20workflows%2C%20the,and%20everything%20will%20work%20automatically). + - `cancellableValueTask` + - `cancellablePoolingValueTask` - `ParallelAsync<'T>` - Utilizes the [applicative syntax](https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#applicative-computation-expressions) to allow parallel execution of [Async<'T> expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/async-expressions). See [this discussion](https://github.com/dotnet/fsharp/discussions/11043) as to why this is a separate computation expression. + - `parallelAsync` -- `AsyncEx<'T>` - Slight variation of F# async semantics described further below with examples. +- `AsyncEx<'T>` - Variation of F# async semantics described further below with examples. + - `asyncEx` + +- `Task<'T>` - Polyfill for fixes to F# Task CE. Can be accessed under `IcedTasks.Polyfill` + - `task` + - `backgroundTask` + +- `Task` - a CE for a`Task` that has no return value. + - `taskUnit` + - `backgroundTaskUnit` ## Why should I use IcedTasks?