Skip to content

M_CodeJam_Threading_ParallelExtensions_RunInParallel

andrewvk edited this page Jun 23, 2016 · 7 revisions

ParallelExtensions.RunInParallel Method (IEnumerable(Action), Int32, String)

Runs in parallel provided source of actions.

Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public static void RunInParallel(
	this IEnumerable<Action> source,
	int parallelCount,
	string processName = "ParallelProcess"
)

VB

<ExtensionAttribute>
Public Shared Sub RunInParallel ( 
	source As IEnumerable(Of Action),
	parallelCount As Integer,
	Optional processName As String = "ParallelProcess"
)

F#

[<ExtensionAttribute>]
static member RunInParallel : 
        source : IEnumerable<Action> * 
        parallelCount : int * 
        ?processName : string 
(* Defaults:
        let _processName = defaultArg processName "ParallelProcess"
*)
-> unit 

Parameters

 

source
Type: System.Collections.Generic.IEnumerable(Action)
Actions to run.
parallelCount
Type: System.Int32
number of threads to use.
processName (Optional)
Type: System.String
Process name pattern.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable(Action). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also

Reference

ParallelExtensions Class
RunInParallel Overload
CodeJam.Threading Namespace

Clone this wiki locally