ThreadedCalculationBodyCallbackWithProgress2TParameter1, TParameter2 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 BodyCallbackWithProgress2<TParameter1, TParameter2>(
TParameter1 parameter1,
TParameter2 parameter2,
int i,
ITrackCalculationProgress tracker
)
Public Delegate Sub BodyCallbackWithProgress2(Of TParameter1, TParameter2) (
parameter1 As TParameter1,
parameter2 As TParameter2,
i As Integer,
tracker As ITrackCalculationProgress
)
generic<typename TParameter1, typename TParameter2>
public delegate void BodyCallbackWithProgress2(
TParameter1 parameter1,
TParameter2 parameter2,
int i,
ITrackCalculationProgress^ tracker
)
type BodyCallbackWithProgress2 =
delegate of
parameter1 : 'TParameter1 *
parameter2 : 'TParameter2 *
i : int *
tracker : ITrackCalculationProgress -> unit
Parameters
- parameter1
- Type: TParameter1
The first 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.
- parameter2
- Type: TParameter2
The second 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
- TParameter1
- The type of the first instance that is passed to the body of the loop.
- TParameter2
- The type of the second instance that is passed to the body of the loop.
See Also