ThreadedCalculationBodyCallbackWithProgressTParameter Delegate |
A delegate representing the body of a multithreaded 'for' loop, where each iteration
of the loop intends to provide detailed information about its progress. This is useful when
the parallel loop has too few iterations to accurately compute progress as the number of completed
iterations divided by the total number of iterations.
The execution of the callback will see a
ThreadingPolicy
with only one thread unless it is explicitly set inside the callback.
Namespace:
AGI.Foundation.Infrastructure.Threading
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public delegate void BodyCallbackWithProgress<TParameter>(
TParameter parameter,
int i,
ITrackCalculationProgress tracker
)
Public Delegate Sub BodyCallbackWithProgress(Of TParameter) (
parameter As TParameter,
i As Integer,
tracker As ITrackCalculationProgress
)
generic<typename TParameter>
public delegate void BodyCallbackWithProgress(
TParameter parameter,
int i,
ITrackCalculationProgress^ tracker
)
type BodyCallbackWithProgress =
delegate of
parameter : 'TParameter *
i : int *
tracker : ITrackCalculationProgress -> unit
Parameters
- parameter
- Type: TParameter
A parameter that is passed to the body of the loop. If this instance implements
IThreadAware and IsThreadSafe returns
, a copy of the parameter is made for each thread using
CopyForAnotherThread.
- i
- Type: SystemInt32
The index to evaluate. - tracker
- Type: AGI.FoundationITrackCalculationProgress
The object to which progress is reported and that is able to cancel this operation before it is complete, or .
Type Parameters
- TParameter
- The type of an instance that is passed to the body of the loop.
See Also