Parallel Parallel Parallel Parallel Class

Definición

Proporciona compatibilidad con regiones y bucles paralelos.Provides support for parallel loops and regions.

public ref class Parallel abstract sealed
public static class Parallel
type Parallel = class
Public Class Parallel
Herencia
ParallelParallelParallelParallel

Ejemplos

En este ejemplo se muestran varios enfoques para implementar un bucle paralelo mediante construcciones de varios lenguajes.This example demonstrates several approaches to implementing a parallel loop using multiple language constructs.

using System.Threading.Tasks;   
class Test
{
    static int N = 1000;

    static void TestMethod()
    {
        // Using a named method.
        Parallel.For(0, N, Method2);

        // Using an anonymous method.
        Parallel.For(0, N, delegate(int i)
        {
            // Do Work.
        });

        // Using a lambda expression.
        Parallel.For(0, N, i =>
        {
            // Do Work.
        });
    }

    static void Method2(int i)
    {
        // Do work.
    }
}
Imports System.Threading.Tasks
Module Module1

    Sub Main()
        Dim N As Integer = 1000

        ' Using a named method
        Parallel.For(0, N, AddressOf Method2)

        ' Using a lambda expression.
        Parallel.For(0, N, Sub(i)
                               ' Do Work
                           End Sub)
    End Sub

    Sub Method2(ByVal i As Integer)
        ' Do work.
    End Sub

End Module

Comentarios

La Parallel clase proporciona reemplazos en paralelo de datos basados en biblioteca para operaciones comunes como bucles for, bucles for each y ejecución de un conjunto de instrucciones.The Parallel class provides library-based data parallel replacements for common operations such as for loops, for each loops, and execution of a set of statements.

Métodos

For(Int32, Int32, Action<Int32,ParallelLoopState>) For(Int32, Int32, Action<Int32,ParallelLoopState>) For(Int32, Int32, Action<Int32,ParallelLoopState>) For(Int32, Int32, Action<Int32,ParallelLoopState>)

Ejecuta una bucle for donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a for loop in which iterations may run in parallel and the state of the loop can be monitored and manipulated.

For(Int32, Int32, Action<Int32>) For(Int32, Int32, Action<Int32>) For(Int32, Int32, Action<Int32>) For(Int32, Int32, Action<Int32>)

Ejecuta un bucle for en el que es posible ejecutar iteraciones en paralelo.Executes a for loop in which iterations may run in parallel.

For(Int64, Int64, Action<Int64,ParallelLoopState>) For(Int64, Int64, Action<Int64,ParallelLoopState>) For(Int64, Int64, Action<Int64,ParallelLoopState>) For(Int64, Int64, Action<Int64,ParallelLoopState>)

Ejecuta un bucle for con índices de 64 bits en el que es posible ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a for loop with 64-bit indexes in which iterations may run in parallel and the state of the loop can be monitored and manipulated.

For(Int64, Int64, Action<Int64>) For(Int64, Int64, Action<Int64>) For(Int64, Int64, Action<Int64>) For(Int64, Int64, Action<Int64>)

Ejecuta un bucle for con índices 64 bits en el que se pueden ejecutar iteraciones en paralelo.Executes a for loop with 64-bit indexes in which iterations may run in parallel.

For(Int32, Int32, ParallelOptions, Action<Int32,ParallelLoopState>) For(Int32, Int32, ParallelOptions, Action<Int32,ParallelLoopState>) For(Int32, Int32, ParallelOptions, Action<Int32,ParallelLoopState>) For(Int32, Int32, ParallelOptions, Action<Int32,ParallelLoopState>)

Ejecuta un bucle for donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a for loop in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

For(Int32, Int32, ParallelOptions, Action<Int32>) For(Int32, Int32, ParallelOptions, Action<Int32>) For(Int32, Int32, ParallelOptions, Action<Int32>) For(Int32, Int32, ParallelOptions, Action<Int32>)

Ejecuta un bucle for en el que se pueden ejecutar iteraciones en paralelo y configurar las opciones de bucle.Executes a for loop in which iterations may run in parallel and loop options can be configured.

For(Int64, Int64, ParallelOptions, Action<Int64,ParallelLoopState>) For(Int64, Int64, ParallelOptions, Action<Int64,ParallelLoopState>) For(Int64, Int64, ParallelOptions, Action<Int64,ParallelLoopState>) For(Int64, Int64, ParallelOptions, Action<Int64,ParallelLoopState>)

Ejecuta un bucle for con índices de 64 bits en el que es posible ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a for loop with 64-bit indexes in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

For(Int64, Int64, ParallelOptions, Action<Int64>) For(Int64, Int64, ParallelOptions, Action<Int64>) For(Int64, Int64, ParallelOptions, Action<Int64>) For(Int64, Int64, ParallelOptions, Action<Int64>)

Ejecuta un bucle for con índices de 64 bits en el que se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle.Executes a for loop with 64-bit indexes in which iterations may run in parallel and loop options can be configured.

For<TLocal>(Int64, Int64, ParallelOptions, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, ParallelOptions, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, ParallelOptions, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, ParallelOptions, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta un bucle for con índices de 64 bits y datos locales del subproceso en el que es posible ejecutar iteraciones en paralelo, se pueden configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a for loop with 64-bit indexes and thread-local data in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

For<TLocal>(Int32, Int32, ParallelOptions, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, ParallelOptions, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, ParallelOptions, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, ParallelOptions, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta un bucle for con datos locales del subproceso en que es posible ejecutar iteraciones en paralelo, se pueden configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a for loop with thread-local data in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

For<TLocal>(Int32, Int32, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int32, Int32, Func<TLocal>, Func<Int32,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta un bucle for con datos locales del subproceso en el que es posible ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a for loop with thread-local data in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

For<TLocal>(Int64, Int64, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) For<TLocal>(Int64, Int64, Func<TLocal>, Func<Int64,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta un bucle for con índices de 64 bits y datos locales del subproceso en el que es posible ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a for loop with 64-bit indexes and thread-local data in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en IEnumerable donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on an IEnumerable in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con índices de 64 bits y datos locales del subproceso en IEnumerable donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data and 64-bit indexes on an IEnumerable in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(Partitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en Partitioner donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on a Partitioner in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, ParallelOptions, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con índices de 64 bits y datos locales del subproceso en OrderablePartitioner<TSource> donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with 64-bit indexes and with thread-local data on a OrderablePartitioner<TSource> in which iterations may run in parallel , loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en IEnumerable donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on an IEnumerable in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(IEnumerable<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en IEnumerable donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on an IEnumerable in which iterations may run in parallel and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(Partitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(Partitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en Partitioner donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on a Partitioner in which iterations may run in parallel and the state of the loop can be monitored and manipulated.

ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>) ForEach<TSource,TLocal>(OrderablePartitioner<TSource>, Func<TLocal>, Func<TSource,ParallelLoopState,Int64,TLocal,TLocal>, Action<TLocal>)

Ejecuta una operación foreach (For Each en Visual Basic) con datos locales del subproceso en OrderablePartitioner<TSource> donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with thread-local data on a OrderablePartitioner<TSource> in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource>)

Ejecuta una operación foreach (For Each en Visual Basic) en IEnumerable donde se pueden ejecutar iteraciones en paralelo y configurar las opciones de bucle.Executes a foreach (For Each in Visual Basic) operation on an IEnumerable in which iterations may run in parallel and loop options can be configured.

ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>)

Ejecuta una operación foreach (For Each en Visual Basic) en IEnumerable donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on an IEnumerable in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState>)

Ejecuta una operación foreach (For Each en Visual Basic) en IEnumerable donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on an IEnumerable in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource>)

Ejecuta una operación foreach (For Each en Visual Basic) en Partitioner donde se pueden ejecutar iteraciones en paralelo y configurar las opciones de bucle.Executes a foreach (For Each in Visual Basic) operation on a Partitioner in which iterations may run in parallel and loop options can be configured.

ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState>)

Ejecuta una operación foreach (For Each en Visual Basic) en Partitioner donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on a Partitioner in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(OrderablePartitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>)

Ejecuta una operación foreach (For Each en Visual Basic) en OrderablePartitioner<TSource> donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on a OrderablePartitioner<TSource> in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(IEnumerable<TSource>, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource>)

Ejecuta una operación foreach (For Each en Visual Basic) en IEnumerable, en la que es posible ejecutar iteraciones en paralelo.Executes a foreach (For Each in Visual Basic) operation on an IEnumerable in which iterations may run in parallel.

ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, Action<TSource,ParallelLoopState,Int64>)

Ejecuta una operación foreach (For Each en Visual Basic) con índices de 64 bits en IEnumerable donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with 64-bit indexes on an IEnumerable in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(Partitioner<TSource>, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, Action<TSource>) ForEach<TSource>(Partitioner<TSource>, Action<TSource>)

Ejecuta una operación foreach (For Each en Visual Basic) en Partitioner, en la que es posible ejecutar iteraciones en paralelo.Executes a foreach (For Each in Visual Basic) operation on a Partitioner in which iterations may run in parallel.

ForEach<TSource>(Partitioner<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, Action<TSource,ParallelLoopState>) ForEach<TSource>(Partitioner<TSource>, Action<TSource,ParallelLoopState>)

Ejecuta una operación foreach (For Each en Visual Basic) en Partitioner donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on a Partitioner in which iterations may run in parallel, and the state of the loop can be monitored and manipulated.

ForEach<TSource>(OrderablePartitioner<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(OrderablePartitioner<TSource>, Action<TSource,ParallelLoopState,Int64>)

Ejecuta una operación foreach (For Each en Visual Basic) en OrderablePartitioner<TSource> donde se pueden ejecutar iteraciones en paralelo, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation on a OrderablePartitioner<TSource> in which iterations may run in parallel and the state of the loop can be monitored and manipulated.

ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>) ForEach<TSource>(IEnumerable<TSource>, ParallelOptions, Action<TSource,ParallelLoopState,Int64>)

Ejecuta una operación foreach (For Each in Visual Basic) con índices de 64 bits en IEnumerable donde se pueden ejecutar iteraciones en paralelo y configurar opciones de bucle, y el estado del bucle se puede supervisar y manipular.Executes a foreach (For Each in Visual Basic) operation with 64-bit indexes on an IEnumerable in which iterations may run in parallel, loop options can be configured, and the state of the loop can be monitored and manipulated.

Invoke(Action[]) Invoke(Action[]) Invoke(Action[]) Invoke(Action[])

Ejecuta cada una de las acciones proporcionadas, posiblemente en paralelo.Executes each of the provided actions, possibly in parallel.

Invoke(ParallelOptions, Action[]) Invoke(ParallelOptions, Action[]) Invoke(ParallelOptions, Action[]) Invoke(ParallelOptions, Action[])

Ejecuta todas las acciones proporcionadas, posiblemente en paralelo, a menos que el usuario cancele la operación.Executes each of the provided actions, possibly in parallel, unless the operation is cancelled by the user.

Se aplica a

Seguridad para subprocesos

Todos los miembros públicos y protegidos Parallel de son seguros para subprocesos y se pueden usar simultáneamente desde varios subprocesos.All public and protected members of Parallel are thread-safe and may be used concurrently from multiple threads.

Consulte también: