ParallelEnumerable.AsParallel Метод

Определение

Enables parallelization of a query.Enables parallelization of a query.

Перегрузки

AsParallel(IEnumerable)

Enables parallelization of a query.Enables parallelization of a query.

AsParallel<TSource>(Partitioner<TSource>)

Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.

AsParallel<TSource>(IEnumerable<TSource>)

Enables parallelization of a query.Enables parallelization of a query.

Комментарии

Этот метод привязывает запрос к PLINQ.This method binds the query to PLINQ. Дополнительные сведения см. в разделе Parallel LINQ (PLINQ).For more information, see Parallel LINQ (PLINQ).

AsParallel(IEnumerable)

Enables parallelization of a query.Enables parallelization of a query.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery ^ AsParallel(System::Collections::IEnumerable ^ source);
public static System.Linq.ParallelQuery AsParallel (this System.Collections.IEnumerable source);
static member AsParallel : System.Collections.IEnumerable -> System.Linq.ParallelQuery
<Extension()>
Public Function AsParallel (source As IEnumerable) As ParallelQuery

Параметры

source
IEnumerable

An IEnumerable<T> to convert to a ParallelQuery.An IEnumerable<T> to convert to a ParallelQuery.

Возвращаемое значение

The source as a ParallelQuery to bind to ParallelEnumerable extension methods.The source as a ParallelQuery to bind to ParallelEnumerable extension methods.

Исключения

source is a null reference (Nothing in Visual Basic).source is a null reference (Nothing in Visual Basic).

Комментарии

Оператор Cast можно использовать для преобразования ParallelQuery в ParallelQuery (T).The Cast operator can be used to convert a ParallelQuery to a ParallelQuery(T).

Дополнительно

AsParallel<TSource>(Partitioner<TSource>)

Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.Enables parallelization of a query, as sourced by a custom partitioner that is responsible for splitting the input sequence into partitions.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ AsParallel(System::Collections::Concurrent::Partitioner<TSource> ^ source);
public static System.Linq.ParallelQuery<TSource> AsParallel<TSource> (this System.Collections.Concurrent.Partitioner<TSource> source);
static member AsParallel : System.Collections.Concurrent.Partitioner<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function AsParallel(Of TSource) (source As Partitioner(Of TSource)) As ParallelQuery(Of TSource)

Параметры типа

TSource

Тип элементов source.The type of elements of source.

Параметры

source
Partitioner<TSource>

A partitioner over the input sequence.A partitioner over the input sequence.

Возвращаемое значение

The source as a ParallelQuery to bind to ParallelEnumerable extension methods.The source as a ParallelQuery to bind to ParallelEnumerable extension methods.

Исключения

source is a null reference (Nothing in Visual Basic).source is a null reference (Nothing in Visual Basic).

Комментарии

При включении упорядочения используется метод Жетордередпартитионс исходного разделителя, в то время как при сортировке используются секции секционирования, если порядок не включен (по умолчанию).The source partitioner's GetOrderedPartitions method is used when ordering is enabled, whereas the partitioner's GetPartitions is used if ordering is not enabled (the default). Жетдинамикпартитионс и Жетдинамикордередпартитионс исходного раздела не используются.The source partitioner's GetDynamicPartitions and GetDynamicOrderedPartitions are not used. Дополнительные сведения и примеры см. в разделе пользовательские разделители для PLINQ и TPL.For more information and examples, see Custom Partitioners for PLINQ and TPL.

Дополнительно

AsParallel<TSource>(IEnumerable<TSource>)

Enables parallelization of a query.Enables parallelization of a query.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ AsParallel(System::Collections::Generic::IEnumerable<TSource> ^ source);
public static System.Linq.ParallelQuery<TSource> AsParallel<TSource> (this System.Collections.Generic.IEnumerable<TSource> source);
static member AsParallel : seq<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function AsParallel(Of TSource) (source As IEnumerable(Of TSource)) As ParallelQuery(Of TSource)

Параметры типа

TSource

Тип элементов source.The type of elements of source.

Параметры

source
IEnumerable<TSource>

An IEnumerable<T> to convert to a ParallelQuery<TSource>.An IEnumerable<T> to convert to a ParallelQuery<TSource>.

Возвращаемое значение

The source as a ParallelQuery<TSource> to bind to ParallelEnumerable extension methods.The source as a ParallelQuery<TSource> to bind to ParallelEnumerable extension methods.

Исключения

source is a null reference (Nothing in Visual Basic).source is a null reference (Nothing in Visual Basic).

Дополнительно

Применяется к