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 6624803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:41:51+00:00 2026-05-25T21:41:51+00:00

// parameters.Count == 10 // actualFreeLicenses == 2 Parallel.For(0, parameters.Count, new ParallelOptions() { MaxDegreeOfParallelism

  • 0
// parameters.Count == 10
// actualFreeLicenses == 2
Parallel.For(0, parameters.Count, new ParallelOptions() 
                    {
                        MaxDegreeOfParallelism = actualFreeLicenses
                    }, i =>
                    {
                        ExternalProgram(i);
                    }
);

When I execute the above code I notice that the value of i passed to the ExternalProgram method are 1 & 6, later 2 & 7, later 3 & 8 …

If I have 14 Parameters and 2 licenses it always launch 1 & 8, later 2 & 9 …

Is it possible to define order: first 1 & 2, later 3 & 4 etc?

  • 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-05-25T21:41:52+00:00Added an answer on May 25, 2026 at 9:41 pm

    If you are using Parallel the order in which they are executed is not of relevance therefore “Parallel”. You should use a sequential workflow if the order is relevant for you.

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

Sidebar

Related Questions

For a long time, I always thought that the bs and count parameters for
We're getting a server error saying Parameter count does not match Parameter Value count.
Having trouble with the following segment of code. I'm getting a parameter count mismatch.
Routines can have parameters, that's no news. You can define as many parameters as
Consider the following code sample: interface IData { int Count(); } interface IOperations {
I did not find any limitation of count function parameters in the C99 standard
my code fires off ExecuteNonQueryAsyc. In debug I see it hit command.BeginExecuteNonQuery(new AsyncCallback(AsyncCommandCompletionCallback), command);
The code below gets the values I have entered for my report parameters in
I count characters using NobleCount and the following code: $('#message').NobleCount('#messageInfo',{ max_chars: getMaxChars(), on_negative: function(t_obj,
I have a peoples, everybody have:firstname,lastName. And everybody have parameters: [car count, money count,

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.