ColdTaskModule
PackageAxial
Functions for creating and executing cold tasks.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| create | ColdTask.create operation | Creates a cold task from a cancellable factory. |
| fromTaskFactory | ColdTask.fromTaskFactory factory | Creates a cold task from a factory that does not observe cancellation. |
| awaitStartedTask | ColdTask.awaitStartedTask startedTask | Wraps a task that has already been started. |
| fromValueTaskFactory | ColdTask.fromValueTaskFactory factory | Creates a cold task from a cancellable value-task factory. |
| fromValueTaskFactoryWithoutCancellation | ColdTask.fromValueTaskFactoryWithoutCancellation factory | Creates a cold task from a value-task factory that does not observe cancellation. |
| awaitStartedValueTask | ColdTask.awaitStartedValueTask startedValueTask | Wraps a value task that has already been started. |
| run | ColdTask.run cancellationToken coldTask | Executes the cold task with the supplied cancellation token. |
Creates a cold task from a cancellable factory.
Parameters
| Name | Type | Description |
|---|---|---|
| operation | CancellationToken -> Task<'value> | The factory invoked on each execution. |
Returns
ColdTask<'value>
Creates a cold task from a factory that does not observe cancellation.
Parameters
| Name | Type | Description |
|---|---|---|
| factory | unit -> Task<'value> | The factory invoked on each execution. |
Returns
ColdTask<'value>
Wraps a task that has already been started.
Parameters
| Name | Type | Description |
|---|---|---|
| startedTask | Task<'value> | A task that is already running. |
Returns
ColdTask<'value>
Creates a cold task from a cancellable value-task factory.
Parameters
| Name | Type | Description |
|---|---|---|
| factory | CancellationToken -> ValueTask<'value> | The factory invoked on each execution. |
Returns
ColdTask<'value>
ColdTask.fromValueTaskFactoryWithoutCancellation factory
MemberCreates a cold task from a value-task factory that does not observe cancellation.
Parameters
| Name | Type | Description |
|---|---|---|
| factory | unit -> ValueTask<'value> | The factory invoked on each execution. |
Returns
ColdTask<'value>
Wraps a value task that has already been started.
Parameters
| Name | Type | Description |
|---|---|---|
| startedValueTask | ValueTask<'value> | A value task that is already running. |
Returns
ColdTask<'value>

