Paket


AsyncExtensions

Namespace: FSharp.Polyfill

Extensions for async workflows.

Functions and values

Function or valueDescription
getCancelledException (...)
Signature: completedTask:Task -> waitWithAwaiter:(unit -> unit) -> OperationCanceledException

Type extensions

Type extensionDescription
AwaitTaskWithoutAggregate(task)
Signature: task:Task<'T> -> Async<'T>
Type parameters: 'T

CompiledName: Async.AwaitTaskWithoutAggregate.Static

AwaitTaskWithoutAggregate(task)
Signature: task:Task -> Async<unit>

CompiledName: Async.AwaitTaskWithoutAggregate.Static

awaitTaskWithToken(fallBack item)
Signature: (fallBack:(unit -> 'T)) -> item:Task<'T> -> Async<'T>
Type parameters: 'T

CompiledName: Async.awaitTaskWithToken.Static

map(f a)
Signature: (f:('?11667 -> '?11668)) -> a:'?11667 -> Async<'?11668>
Type parameters: '?11667, '?11668

CompiledName: Async.map.Static

Parallel(a, b)
Signature: (a:Async<'a> * b:Async<'b>) -> Async<'a * 'b>
Type parameters: 'a, 'b

Runs both computations in parallel and returns the result as a tuple.

CompiledName: Async.Parallel.Static

StartAsTaskProperCancel(...)
Signature: (computation:Async<'a> * taskCreationOptions:TaskCreationOptions option * cancellationToken:CancellationToken option) -> Task<'a>
Type parameters: 'a

Like StartAsTask but gives the computation time to so some regular cancellation work

CompiledName: Async.StartAsTaskProperCancel.Static

StartCatchCancellation(...)
Signature: (work:Async<'?11663> * cancellationToken:CancellationToken option) -> Async<'?11663>
Type parameters: '?11663

CompiledName: Async.StartCatchCancellation.Static

tryFindParallel(f tasks)
Signature: (f:('T -> bool)) -> tasks:seq<Async<'T>> -> Async<Task<'T> [] * int option>
Type parameters: 'T

CompiledName: Async.tryFindParallel.Static

tryFindSequential(f tasks)
Signature: (f:('T -> bool)) -> tasks:seq<Async<'T>> -> Async<Task<'T> [] * int option>
Type parameters: 'T

CompiledName: Async.tryFindSequential.Static

Fork me on GitHub