Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7770313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:22:46+00:00 2026-06-01T16:22:46+00:00

Using PLINQ C# parallel queries are ordered or unordered depending on how you construct

  • 0

Using PLINQ C# parallel queries are ordered or unordered depending on how you construct them. There is some information on MSDN here regarding order preservation in PLINQ.

I find this confusing and tricky to manage. In my mind collections where the order is significant are sequences and collections where order is not significant are bags (or if there are no duplicates, then they might be sets).

The operations on bags and sequences are different, and have different complexity characteristics especially when implemented as parallel algorithms.

In other words I think that ordered and unordered collections should be different types, and that this would simplify things. Is there a reason why everything in PLINQ is unified as simply a “ParallelQuery()”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:22:48+00:00Added an answer on June 1, 2026 at 4:22 pm

    Is there a reason why everything in PLINQ is unified as simply a “ParallelQuery()”

    It’s simpler. I suppose 2 types would have been possible but at some considerable expense. And would it be any easier to use?

    When you process a sequence in Parallel then by default you give up Order. You ought to be aware that re-establishing sequence is expensive and that it should require some extra steps.

    But when you need it, adding an .AsOrdered() seems much less of a pain than copying (!) your data to another collection first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to understand how parallelism might work using PLINQ, given delayed execution. Here
I just wonder is parallel File.Read using PLINQ/Parallel can be faster? My code is
I have some per-thread components in my Windsor container. I'm also using PLINQ. In
I have some code to do some lookups and count the occurance using parallel.for:
I am using the parallel data structures in my .NET 4 application and I
Amazingly, using PLINQ did not yield benefits on a small test case I created;
I'm using PLINQ to run a function that tests serial ports to determine if
Why PLINQ output is different than sequential processing and Parallel.For loop I want to
I've got a for loop I want to parallelize with something like PLINQ's Parallel.ForEach().
I am using .AsParallel().ForAll() to enumerate a collection in parallel in the context of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.