A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.linq.parallelenumerable.asunordered below:

ParallelEnumerable.AsUnordered<TSource>(ParallelQuery<TSource>) Method (System.Linq) | Microsoft Learn

ParallelEnumerable.AsUnordered<TSource> Method Definition

Allows an intermediate query to be treated as if no ordering is implied among the elements.

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

The type of elements of source.

Parameters Returns

The source sequence with arbitrary order.

Exceptions

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

Remarks

AsUnordered may provide performance benefits when ordering is not required in a portion of a query. By default, PLINQ treats an input sequence as unordered unless OrderBy or AsOrdered is specified. However, if ordering was turned on and is no longer needed, then AsUnordered can be used to turn it off in mid-query, and this may result in performance benefits. The AsUnordered operator itself does not shuffle the source sequence; it simply removes the ordering requirement for subsequent operators. If the source is ordered, subsequent operators might keep that ordering if it is more efficient to do so. AsUnordered can be called anywhere in the query; it does not need to be called immediately after AsParallel. For more information, see Understanding Speedup in PLINQ and Order Preservation in PLINQ.

See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4