MBrace.Core


Cloud

Namespace: MBrace.Core.Internals

Internal cloud workflow combinators

Static members

Static memberDescription
FromContinuations(body)
Signature: (body:(ExecutionContext -> Continuation<'T> -> unit)) -> Cloud<'T>
Type parameters: 'T

Creates a cloud workflow that captures the current execution context.

GetExecutionContext()
Signature: unit -> LocalCloud<ExecutionContext>

Returns the execution context of current computation.

GetResource()
Signature: unit -> LocalCloud<'TResource>
Type parameters: 'TResource

Gets resource from current execution context.

GetResourceRegistry()
Signature: unit -> LocalCloud<ResourceRegistry>

Returns the resource registry for current execution context.

RunSynchronously(...)
Signature: (workflow:Cloud<'T> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> 'T
Type parameters: 'T

Synchronously await a locally executing workflow.

Start(...)
Signature: (workflow:Cloud<unit> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> unit

Starts provided cloud workflow in the thread pool.

StartAsTask(...)
Signature: (workflow:Cloud<'T> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option * taskCreationOptions:TaskCreationOptions option) -> Task<'T>
Type parameters: 'T

Starts given workflow as a System.Threading.Task

StartImmediate(...)
Signature: (workflow:Cloud<unit> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> unit

Starts provided cloud workflow in the current thread.

StartImmediateWithContinuations(...)
Signature: (workflow:Cloud<'T> * continuation:Continuation<'T> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> unit
Type parameters: 'T

Starts a cloud workflow with given execution context in the current thread.

StartImmediateWithContinuations(...)
Signature: (workflow:Cloud<'T> * continuation:Continuation<'T> * context:ExecutionContext) -> unit
Type parameters: 'T

Starts a cloud workflow with given execution context in the current thread.

StartWithContinuations(...)
Signature: (workflow:Cloud<'T> * continuation:Continuation<'T> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> unit
Type parameters: 'T

Starts a cloud workflow with given continuations and execution context in the thread pool.

StartWithContinuations(...)
Signature: (workflow:Cloud<'T> * continuation:Continuation<'T> * context:ExecutionContext) -> unit
Type parameters: 'T

Starts a cloud workflow with given continuations and execution context in the thread pool.

SwitchToThreadPool()
Signature: unit -> LocalCloud<unit>

Forces the workflow to schedule its current continuation to the thread pool, offloading the accumulated stack from the current thread.

ToAsync(...)
Signature: (workflow:Cloud<'T> * resources:ResourceRegistry option * cancellationToken:ICloudCancellationToken option) -> Async<'T>
Type parameters: 'T

Wraps a cloud workflow into an asynchronous workflow.

TryGetResource()
Signature: unit -> LocalCloud<'TResource option>
Type parameters: 'TResource

Try Getting resource from current execution context.

WithAppendedStackTrace(...)
Signature: functionName:string -> workflow:'a -> Cloud<'T>
Type parameters: 'a, 'T

Appends a function information entry to the symbolic stacktrace in the exception continuation.

WithMappedContinuation(mapper workflow)
Signature: (mapper:(Continuation<'T> -> Continuation<'S>)) -> workflow:'?8383 -> Cloud<'T>
Type parameters: 'T, 'S, '?8383

Wraps a workflow with a mapped continuation.

WithNestedContext(...)
Signature: (workflow:Cloud<'T> * update:(ExecutionContext -> ExecutionContext) * revert:(ExecutionContext -> ExecutionContext)) -> Cloud<'T>
Type parameters: 'T

Runs provided workflow in a nested execution context that is introduced using the update/revert functions. These must be serializable and exception safe.

WithNestedResource(...)
Signature: (workflow:Cloud<'T> * update:('TResource -> 'TResource) * revert:('TResource -> 'TResource)) -> Cloud<'T>
Type parameters: 'T, 'TResource

Runs provided workflow in a nested execution context that is introduced using the update/revert functions. These must be serializable and exception safe.

Fork me on GitHub