Documentation de Dvp.Net. Forum : http://www.developpez.net/forums/f1239/applications/projets/projets-heberges/dvp-net/

[Ceci est une documentation préliminaire, sous réserve de modification.]

Exécute la méthode callback de manière parallele sur tous les éléments de la collection

Namespace:  Developpez.Dotnet.Collections
Assembly:  Developpez.Dotnet (in Developpez.Dotnet.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static void ForEachParallel<T>(
	this IEnumerable<T> enumerable,
	ThreadedWorker<(Of <(T>)>)..::.CallBackMethod callback,
	bool waitForCompletion,
	int maxWorkerThreads
)
Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Sub ForEachParallel(Of T) ( _
	enumerable As IEnumerable(Of T), _
	callback As ThreadedWorker<(Of <(T>)>)..::.CallBackMethod, _
	waitForCompletion As Boolean, _
	maxWorkerThreads As Integer _
)
Visual C++
[ExtensionAttribute]
public:
generic<typename T>
static void ForEachParallel(
	IEnumerable<T>^ enumerable, 
	ThreadedWorker<(Of <(T>)>)..::.CallBackMethod^ callback, 
	bool waitForCompletion, 
	int maxWorkerThreads
)

Parameters

enumerable
Type: System.Collections.Generic..::.IEnumerable<(Of <(T>)>)

[Missing <param name="enumerable"/> documentation for "M:Developpez.Dotnet.Collections.EnumerableExtensions.ForEachParallel``1(System.Collections.Generic.IEnumerable{``0},Developpez.Dotnet.Threading.ThreadedWorker{``0}.CallBackMethod,System.Boolean,System.Int32)"]

callback
Type: Developpez.Dotnet.Threading..::.ThreadedWorker<(Of <(T>)>)..::.CallBackMethod
Méthode à rappeller sur chacun des éléments
waitForCompletion
Type: System..::.Boolean
True si l'opération doit être synchrone (attente de la fin de l'opération sur tous les éléments) ou non (aucune attente, l'exécution se poursuit)
maxWorkerThreads
Type: System..::.Int32
Nombre maximum de thread de travail dédié à cette tâche. Toute valeure inférieure à 1 est ignorée

Type Parameters

T
Type de collection

See Also