StateMachineHelpers Module
Contains compiler intrinsics related to the definition of state machines.
Functions and values
Function or value | Description |
|
Only a limited range of debug point names are supported.
If the debug point name is the empty string then the range used for the debug point will be
the range of the outermost expression prior to inlining.
If the debug point name is
|
|
|
|
|
Full Usage:
__stateMachine moveNextMethod setStateMachineMethod afterCode
Parameters:
MoveNextMethodImpl<'Data>
-
Gives the implementation of the MoveNext method on IAsyncStateMachine.
setStateMachineMethod : SetStateMachineMethodImpl<'Data>
-
Gives the implementation of the SetStateMachine method on IAsyncStateMachine.
afterCode : AfterCode<'Data, 'Result>
-
Gives code to execute after the generation of the state machine and to produce the final result.
Returns: 'Result
|
At compile-time, the ResumableStateMachine type guides the generation of a new struct type by the F# compiler with closure-capture fields in a way similar to an object expression. Any mention of the ResumableStateMachine type in any the 'methods' is rewritten to this fresh struct type. The 'methods' are used to implement the interfaces on ResumableStateMachine and are also rewritten. The 'after' method is then executed and must eliminate the ResumableStateMachine. For example, its return type must not include ResumableStateMachine.
|
|
|