CompilationUnitManager.FlushAndExecute<T>(Func<T>) Method

Definition

Cancels any asynchronously running ongoing global type checking. After all currently queued tasks have finished, locks all processing, flushes the unprocessed changes in each source file, synchronously runs a global type checking (unless verifications are disabled), and then executes execute, returning its result.

public T? FlushAndExecute<T> (Func<T?>? execute = default) where T : class;
member this.FlushAndExecute : Func<'T (requires 'T : null)> -> 'T (requires 'T : null)
Public Function FlushAndExecute(Of T As Class) (Optional execute As Func(Of T) = Nothing) As T

Type Parameters

T

Parameters

execute
Func<T>

Returns

T

The result of execute, or null if execute is null.

Remarks

Sets Microsoft.Quantum.QsCompiler.CompilationBuilder.CompilationUnitManager.waitForTypeCheck to null, indicating that a global type checking is queued and not yet started.

Applies to